Module: Roda::RodaPlugins::DefaultHeaders::ClassMethods
- Defined in:
- lib/roda/plugins/default_headers.rb
Instance Attribute Summary collapse
-
#default_headers ⇒ Object
readonly
The default response headers to use for the current class.
Instance Method Summary collapse
-
#inherited(subclass) ⇒ Object
Copy the default headers into the subclass when inheriting.
Instance Attribute Details
#default_headers ⇒ Object (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 |