Class: PipelineDealsApi::HttpClient::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/pipeline_deals_api/http_client.rb

Instance Method Summary collapse

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

#bodyObject



111
112
113
# File 'lib/pipeline_deals_api/http_client.rb', line 111

def body
  @response.body
end

#codeObject



107
108
109
# File 'lib/pipeline_deals_api/http_client.rb', line 107

def code
  @response.code
end

#jsonObject



115
116
117
# File 'lib/pipeline_deals_api/http_client.rb', line 115

def json
  @json ||= JSON.parse(@response.body)
end