Class: NewRelic::Manticore::WrappedResponse
- Inherits:
-
Object
- Object
- NewRelic::Manticore::WrappedResponse
- Defined in:
- lib/new_relic/manticore/wrapped_response.rb
Instance Method Summary collapse
- #[](key) ⇒ Object
-
#initialize(response) ⇒ WrappedResponse
constructor
A new instance of WrappedResponse.
- #to_hash ⇒ Object
Constructor Details
#initialize(response) ⇒ WrappedResponse
Returns a new instance of WrappedResponse.
4 5 6 |
# File 'lib/new_relic/manticore/wrapped_response.rb', line 4 def initialize(response) @headers = response.headers end |
Instance Method Details
#[](key) ⇒ Object
8 9 10 11 |
# File 'lib/new_relic/manticore/wrapped_response.rb', line 8 def [](key) _, value = @headers.find { |k, _| k.casecmp(key).zero? } value end |
#to_hash ⇒ Object
13 14 15 |
# File 'lib/new_relic/manticore/wrapped_response.rb', line 13 def to_hash @headers end |