Class: Response

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Response

Returns a new instance of Response.



4
5
6
7
8
# File 'lib/response.rb', line 4

def initialize data
  @code = data['code']
  @content = data['body']
  @headers = data['headers']
end

Instance Attribute Details

#codeObject

Returns the value of attribute code.



2
3
4
# File 'lib/response.rb', line 2

def code
  @code
end

#contentObject

Returns the value of attribute content.



2
3
4
# File 'lib/response.rb', line 2

def content
  @content
end

#headersObject

Returns the value of attribute headers.



2
3
4
# File 'lib/response.rb', line 2

def headers
  @headers
end