Module: Harvest::Plugins::ActiveResourceInheritableHeaders::ClassMethods

Defined in:
lib/harvest/plugins/active_resource_inheritable_headers.rb

Instance Method Summary collapse

Instance Method Details

#inheritable_headersObject

If headers are not defined in a given subclass, then obtain headers from the superclass.



13
14
15
16
17
18
19
20
21
# File 'lib/harvest/plugins/active_resource_inheritable_headers.rb', line 13

def inheritable_headers
  if defined?(@headers)
    @headers
  elsif superclass != Object && superclass.headers
    superclass.headers
  else
    @headers ||= {}
  end
end