Class: PipelineDealsApi::HttpClient::Response
- Inherits:
-
Object
- Object
- PipelineDealsApi::HttpClient::Response
- Defined in:
- lib/pipeline_deals_api/http_client.rb
Instance Method Summary collapse
- #body ⇒ Object
- #code ⇒ Object
-
#initialize(response) ⇒ Response
constructor
A new instance of Response.
- #json ⇒ Object
Constructor Details
#initialize(response) ⇒ Response
Returns a new instance of Response.
103 104 105 |
# File 'lib/pipeline_deals_api/http_client.rb', line 103 def initialize(response) @response = response end |
Instance Method Details
#body ⇒ Object
111 112 113 |
# File 'lib/pipeline_deals_api/http_client.rb', line 111 def body @response.body end |
#code ⇒ Object
107 108 109 |
# File 'lib/pipeline_deals_api/http_client.rb', line 107 def code @response.code end |
#json ⇒ Object
115 116 117 |
# File 'lib/pipeline_deals_api/http_client.rb', line 115 def json @json ||= JSON.parse(@response.body) end |