Class: Applinks::Builder::WebBlock

Inherits:
MetaBlock
  • Object
show all
Defined in:
lib/applinks/builder.rb

Instance Attribute Summary

Attributes inherited from MetaBlock

#url

Instance Method Summary collapse

Constructor Details

#initialize(hsh = {}, _unused) ⇒ WebBlock

Returns a new instance of WebBlock.



132
133
134
135
# File 'lib/applinks/builder.rb', line 132

def initialize hsh = {}, _unused
  super(hsh)
  @should_fallback = hsh.has_key?(:should_fallback) ? hsh[:should_fallback] : true
end

Instance Method Details

#should_fallback?Boolean

Returns:

  • (Boolean)


137
138
139
# File 'lib/applinks/builder.rb', line 137

def should_fallback?
  @should_fallback
end

#valid?Boolean

Returns:

  • (Boolean)


141
142
143
# File 'lib/applinks/builder.rb', line 141

def valid?
  !should_fallback? || !@url.nil?
end