Class: Testrail::Response
- Inherits:
-
Object
- Object
- Testrail::Response
- Extended by:
- Forwardable
- Defined in:
- lib/testrail/response.rb
Instance Attribute Summary collapse
-
#error ⇒ Object
Returns the value of attribute error.
-
#http_response ⇒ Object
readonly
Returns the value of attribute http_response.
-
#payload ⇒ Object
Returns the value of attribute payload.
-
#success ⇒ Object
Returns the value of attribute success.
Instance Method Summary collapse
-
#initialize(http_response = nil) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(http_response = nil) ⇒ Response
Returns a new instance of Response.
13 14 15 16 17 |
# File 'lib/testrail/response.rb', line 13 def initialize(http_response = nil) @http_response = http_response parse_payload if http_response.respond_to?(:body) && !http_response.body.nil? parse_error if Integer(http_response.code) >= 400 end |
Instance Attribute Details
#error ⇒ Object
Returns the value of attribute error.
7 8 9 |
# File 'lib/testrail/response.rb', line 7 def error @error end |
#http_response ⇒ Object (readonly)
Returns the value of attribute http_response.
6 7 8 |
# File 'lib/testrail/response.rb', line 6 def http_response @http_response end |
#payload ⇒ Object
Returns the value of attribute payload.
7 8 9 |
# File 'lib/testrail/response.rb', line 7 def payload @payload end |
#success ⇒ Object
Returns the value of attribute success.
7 8 9 |
# File 'lib/testrail/response.rb', line 7 def success @success end |