Class: NewRelic::Manticore::WrappedResponse
- Inherits:
-
Agent::HTTPClients::AbstractResponse
- Object
- Agent::HTTPClients::AbstractResponse
- 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.
8 9 10 11 |
# File 'lib/new_relic/manticore/wrapped_response.rb', line 8 def initialize(response) super(response) @headers = response.headers end |
Instance Method Details
#[](key) ⇒ Object
13 14 15 16 |
# File 'lib/new_relic/manticore/wrapped_response.rb', line 13 def [](key) _, value = @headers.find { |k, _| k.casecmp(key).zero? } value end |
#to_hash ⇒ Object
18 19 20 |
# File 'lib/new_relic/manticore/wrapped_response.rb', line 18 def to_hash @headers end |