| Class | Rack::Utils::HeaderHash |
| In: |
lib/rack/utils.rb
|
| Parent: | Hash |
A case-insensitive Hash that preserves the original case of a header when set.
# File lib/rack/utils.rb, line 162
162: def initialize(hash={})
163: @names = {}
164: hash.each { |k, v| self[k] = v }
165: end
# File lib/rack/utils.rb, line 175
175: def []=(k, v)
176: delete k
177: @names[k.downcase] = k
178: super k, v
179: end
# File lib/rack/utils.rb, line 198
198: def merge(other)
199: hash = dup
200: hash.merge! other
201: end