Class: RubyProxyHeaders::HeaderMap
- Inherits:
-
Hash
- Object
- Hash
- RubyProxyHeaders::HeaderMap
- Defined in:
- lib/ruby_proxy_headers.rb
Overview
HTTP header map with case-insensitive lookup. Names are stored downcased,
which is how Net::HTTP yields them. X-ProxyMesh-IP and x-proxymesh-ip
read the same value. [], []=, fetch, delete, and key? normalize
names. Other Hash methods still use the stored downcased key.
Instance Method Summary collapse
- #[](key) ⇒ Object
- #[]=(key, value) ⇒ Object
- #delete(key) ⇒ Object
- #fetch(key, *args, &block) ⇒ Object
- #key?(key) ⇒ Boolean
Instance Method Details
#[](key) ⇒ Object
15 16 17 |
# File 'lib/ruby_proxy_headers.rb', line 15 def [](key) super(normalize(key)) end |
#[]=(key, value) ⇒ Object
19 20 21 |
# File 'lib/ruby_proxy_headers.rb', line 19 def []=(key, value) super(normalize(key), value) end |
#delete(key) ⇒ Object
27 28 29 |
# File 'lib/ruby_proxy_headers.rb', line 27 def delete(key) super(normalize(key)) end |
#fetch(key, *args, &block) ⇒ Object
23 24 25 |
# File 'lib/ruby_proxy_headers.rb', line 23 def fetch(key, *args, &block) super(normalize(key), *args, &block) end |
#key?(key) ⇒ Boolean
31 32 33 |
# File 'lib/ruby_proxy_headers.rb', line 31 def key?(key) super(normalize(key)) end |