Class: RSpec::Httpd::Client::HeadersHash
- Inherits:
-
Hash
- Object
- Hash
- RSpec::Httpd::Client::HeadersHash
- Defined in:
- lib/rspec/httpd/client.rb
Instance Method Summary collapse
- #[](key) ⇒ Object
-
#initialize(response) ⇒ HeadersHash
constructor
A new instance of HeadersHash.
Constructor Details
#initialize(response) ⇒ HeadersHash
Returns a new instance of HeadersHash.
84 85 86 87 88 89 90 91 92 |
# File 'lib/rspec/httpd/client.rb', line 84 def initialize(response) response.each_header do |k, v| case self[k] when Array then self[k].concat v when nil then self[k] = v else self[k].concat(v) end end end |
Instance Method Details
#[](key) ⇒ Object
94 95 96 |
# File 'lib/rspec/httpd/client.rb', line 94 def [](key) super key.downcase end |