Class: NewRelic::Agent::HTTPClients::HTTPClientResponse
- Inherits:
-
Object
- Object
- NewRelic::Agent::HTTPClients::HTTPClientResponse
- Defined in:
- lib/new_relic/agent/http_clients/httpclient_wrappers.rb
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
- #[](key) ⇒ Object
-
#initialize(response) ⇒ HTTPClientResponse
constructor
A new instance of HTTPClientResponse.
- #to_hash ⇒ Object
Constructor Details
#initialize(response) ⇒ HTTPClientResponse
Returns a new instance of HTTPClientResponse.
11 12 13 |
# File 'lib/new_relic/agent/http_clients/httpclient_wrappers.rb', line 11 def initialize(response) @response = response end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
9 10 11 |
# File 'lib/new_relic/agent/http_clients/httpclient_wrappers.rb', line 9 def response @response end |
Instance Method Details
#[](key) ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/new_relic/agent/http_clients/httpclient_wrappers.rb', line 15 def [](key) response.headers.each do |k,v| if key.downcase == k.downcase return v end end nil end |
#to_hash ⇒ Object
24 25 26 |
# File 'lib/new_relic/agent/http_clients/httpclient_wrappers.rb', line 24 def to_hash response.headers end |