Class: Applinks::Builder::WebBlock
- Defined in:
- lib/applinks/builder.rb
Instance Attribute Summary
Attributes inherited from MetaBlock
Instance Method Summary collapse
-
#initialize(hsh = {}, _unused) ⇒ WebBlock
constructor
A new instance of WebBlock.
- #should_fallback? ⇒ Boolean
- #valid? ⇒ Boolean
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
137 138 139 |
# File 'lib/applinks/builder.rb', line 137 def should_fallback? @should_fallback end |
#valid? ⇒ Boolean
141 142 143 |
# File 'lib/applinks/builder.rb', line 141 def valid? !should_fallback? || !@url.nil? end |