Class: ActionController::Http::Headers
- Defined in:
- lib/action_controller/headers.rb
Instance Method Summary collapse
- #[](header_name) ⇒ Object
-
#initialize(constructor = {}) ⇒ Headers
constructor
A new instance of Headers.
Constructor Details
#initialize(constructor = {}) ⇒ Headers
Returns a new instance of Headers.
5 6 7 8 9 10 11 12 |
# File 'lib/action_controller/headers.rb', line 5 def initialize(constructor = {}) if constructor.is_a?(Hash) super() update(constructor) else super(constructor) end end |
Instance Method Details
#[](header_name) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/action_controller/headers.rb', line 14 def [](header_name) if include?(header_name) super else super(normalize_header(header_name)) end end |