Class: Rack::TrafficLogger::HeaderHash

Inherits:
Hash
  • Object
show all
Defined in:
lib/rack/traffic_logger/header_hash.rb

Instance Method Summary collapse

Constructor Details

#initialize(source = nil) ⇒ HeaderHash

Returns a new instance of HeaderHash.



5
6
7
# File 'lib/rack/traffic_logger/header_hash.rb', line 5

def initialize(source = nil)
  source.each { |k, v| self[k] = v } if Hash === source
end

Instance Method Details

#[](key) ⇒ Object



9
10
11
# File 'lib/rack/traffic_logger/header_hash.rb', line 9

def [](key)
  super normalize_key key
end

#[]=(key, value) ⇒ Object



13
14
15
# File 'lib/rack/traffic_logger/header_hash.rb', line 13

def []=(key, value)
  super normalize_key(key), value
end