Class: Buffer::HttpClient::Response

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

Overview

Response object contains the response returned by the client

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(body, code, headers) ⇒ Response

Returns a new instance of Response.



10
11
12
13
14
# File 'lib/buffer/http_client/response.rb', line 10

def initialize(body, code, headers)
  @body = body
  @code = code
  @headers = headers
end

Instance Attribute Details

#bodyObject

Returns the value of attribute body.



8
9
10
# File 'lib/buffer/http_client/response.rb', line 8

def body
  @body
end

#codeObject

Returns the value of attribute code.



8
9
10
# File 'lib/buffer/http_client/response.rb', line 8

def code
  @code
end

#headersObject

Returns the value of attribute headers.



8
9
10
# File 'lib/buffer/http_client/response.rb', line 8

def headers
  @headers
end