Module: Contentful::MiddlemanPages::ResourceInstanceMethods
- Defined in:
- lib/contentful/middleman-pages/extension.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(symbol, *args, &block) ⇒ Object
20
21
22
23
|
# File 'lib/contentful/middleman-pages/extension.rb', line 20
def method_missing(symbol, *args, &block)
return data.fetch(symbol.to_s) if key_in_data(symbol)
super
end
|
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
8
9
10
|
# File 'lib/contentful/middleman-pages/extension.rb', line 8
def data
@data
end
|
Instance Method Details
#ignored? ⇒ Boolean
10
11
12
13
14
|
# File 'lib/contentful/middleman-pages/extension.rb', line 10
def ignored?
false
end
|
#respond_to?(symbol) ⇒ Boolean
16
17
18
|
# File 'lib/contentful/middleman-pages/extension.rb', line 16
def respond_to?(symbol)
key_in_data(symbol) || super
end
|