Class: Kruger::Client::Response
- Inherits:
-
Object
- Object
- Kruger::Client::Response
- Defined in:
- lib/kruger/client/response.rb
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
- #body ⇒ Object
-
#initialize(response = nil) ⇒ Response
constructor
A new instance of Response.
- #status ⇒ Object
- #success? ⇒ Boolean
Constructor Details
#initialize(response = nil) ⇒ Response
Returns a new instance of Response.
8 9 10 |
# File 'lib/kruger/client/response.rb', line 8 def initialize(response = nil) @response = response end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
6 7 8 |
# File 'lib/kruger/client/response.rb', line 6 def response @response end |
Instance Method Details
#body ⇒ Object
12 13 14 |
# File 'lib/kruger/client/response.rb', line 12 def body response.parsed_response end |
#status ⇒ Object
20 21 22 |
# File 'lib/kruger/client/response.rb', line 20 def status response.code end |
#success? ⇒ Boolean
16 17 18 |
# File 'lib/kruger/client/response.rb', line 16 def success? response.success? end |