Class: Swgr2rb::Response
- Inherits:
-
Object
- Object
- Swgr2rb::Response
- Defined in:
- lib/request_sender/response.rb
Overview
Response parses API response.
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#code ⇒ Object
Returns the value of attribute code.
-
#headers ⇒ Object
Returns the value of attribute headers.
Instance Method Summary collapse
-
#initialize(response) ⇒ Response
constructor
A new instance of Response.
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
#body ⇒ Object
Returns the value of attribute body.
6 7 8 |
# File 'lib/request_sender/response.rb', line 6 def body @body end |
#code ⇒ Object
Returns the value of attribute code.
6 7 8 |
# File 'lib/request_sender/response.rb', line 6 def code @code end |
#headers ⇒ Object
Returns the value of attribute headers.
6 7 8 |
# File 'lib/request_sender/response.rb', line 6 def headers @headers end |