| 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 189
189: def initialize(hash={})
190: @names = {}
191: hash.each { |k, v| self[k] = v }
192: end
# File lib/rack/utils.rb, line 209
209: def []=(k, v)
210: delete k
211: @names[k.downcase] = k
212: super k, v
213: end
# File lib/rack/utils.rb, line 232
232: def merge(other)
233: hash = dup
234: hash.merge! other
235: end