Class: Deploygate::Client::Response
- Inherits:
-
Object
- Object
- Deploygate::Client::Response
- Defined in:
- lib/deploygate/client/response.rb
Overview
Api response
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#headers ⇒ Object
Returns the value of attribute headers.
-
#status ⇒ Object
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(f_response) ⇒ Response
constructor
A new instance of Response.
- #success? ⇒ Boolean
Constructor Details
#initialize(f_response) ⇒ Response
Returns a new instance of Response.
9 10 11 12 13 |
# File 'lib/deploygate/client/response.rb', line 9 def initialize(f_response) @body = f_response.body @headers = f_response.headers @status = f_response.status end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
7 8 9 |
# File 'lib/deploygate/client/response.rb', line 7 def body @body end |
#headers ⇒ Object
Returns the value of attribute headers.
7 8 9 |
# File 'lib/deploygate/client/response.rb', line 7 def headers @headers end |
#status ⇒ Object
Returns the value of attribute status.
7 8 9 |
# File 'lib/deploygate/client/response.rb', line 7 def status @status end |
Instance Method Details
#success? ⇒ Boolean
15 16 17 |
# File 'lib/deploygate/client/response.rb', line 15 def success? (200..299).include?(status) end |