Module: Roda::RodaPlugins::DefaultHeaders::ClassMethods

Defined in:
lib/roda/plugins/default_headers.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#default_headersObject (readonly)

The default response headers to use for the current class.



31
32
33
# File 'lib/roda/plugins/default_headers.rb', line 31

def default_headers
  @default_headers
end

Instance Method Details

#inherited(subclass) ⇒ Object

Copy the default headers into the subclass when inheriting.



34
35
36
37
# File 'lib/roda/plugins/default_headers.rb', line 34

def inherited(subclass)
  super
  subclass.instance_variable_set(:@default_headers, default_headers.dup)
end