module Contentful::MiddlemanPages::ResourceInstanceMethods

Attributes

data[RW]

Public Instance Methods

ignored?() click to toggle source
# File lib/contentful/middleman-pages/extension.rb, line 10
def ignored?
  # As we are ignoring the template used to render this resource
  # the resources won't be rendered. We have to force it.
  false
end
method_missing(symbol, *args, &block) click to toggle source
Calls superclass method
# 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
respond_to?(symbol) click to toggle source
Calls superclass method
# File lib/contentful/middleman-pages/extension.rb, line 16
def respond_to?(symbol)
   key_in_data(symbol) || super
end

Private Instance Methods

key_in_data(key) click to toggle source
# File lib/contentful/middleman-pages/extension.rb, line 26
def key_in_data(key)
  data.key? key.to_s
end