Class: Swgr2rb::Response

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

Overview

Response parses API response.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ Response

Returns a new instance of Response.



8
9
10
11
# File 'lib/request_sender/response.rb', line 8

def initialize(response)
  @response = response
  check_response
end

Instance Attribute Details

#bodyObject

Returns the value of attribute body.



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

def body
  @body
end

#codeObject

Returns the value of attribute code.



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

def code
  @code
end

#headersObject

Returns the value of attribute headers.



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

def headers
  @headers
end