Class: ActionDispatch::Http::Headers
- Inherits:
-
Hash
- Object
- Hash
- ActionDispatch::Http::Headers
- Extended by:
- ActiveSupport::Memoizable
- Defined in:
- lib/action_dispatch/http/headers.rb
Instance Method Summary collapse
- #[](header_name) ⇒ Object
-
#initialize(*args) ⇒ Headers
constructor
A new instance of Headers.
Constructor Details
#initialize(*args) ⇒ Headers
Returns a new instance of Headers.
8 9 10 11 12 13 14 15 |
# File 'lib/action_dispatch/http/headers.rb', line 8 def initialize(*args) if args.size == 1 && args[0].is_a?(Hash) super() update(args[0]) else super end end |
Instance Method Details
#[](header_name) ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/action_dispatch/http/headers.rb', line 17 def [](header_name) if include?(header_name) super else super(env_name(header_name)) end end |