Class: Net::HTTPResponse::HeadersHash
- Inherits:
-
Hash
- Object
- Hash
- Net::HTTPResponse::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.
10 11 12 13 14 15 16 17 18 |
# File 'lib/rspec/httpd/client.rb', line 10 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
20 21 22 |
# File 'lib/rspec/httpd/client.rb', line 20 def [](key) super key.downcase end |