Class: SynapseClient::APIOperations::Response
- Inherits:
-
Object
- Object
- SynapseClient::APIOperations::Response
- Defined in:
- lib/synapse_client/api_operations/response.rb
Instance Attribute Summary collapse
-
#cookies ⇒ Object
readonly
Returns the value of attribute cookies.
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#error_msg ⇒ Object
readonly
Returns the value of attribute error_msg.
-
#status_code ⇒ Object
readonly
Returns the value of attribute status_code.
-
#success ⇒ Object
(also: #successful?)
readonly
Returns the value of attribute success.
Instance Method Summary collapse
-
#initialize(response, cookies = nil) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(response, cookies = nil) ⇒ Response
Returns a new instance of Response.
11 12 13 14 15 16 17 18 19 |
# File 'lib/synapse_client/api_operations/response.rb', line 11 def initialize(response, =nil) response = Map.new(response) @status_code = response.delete(:status_code) @success = response.delete(:success) @error_msg = response.delete(:reason) @data = response @cookies = end |
Instance Attribute Details
#cookies ⇒ Object (readonly)
Returns the value of attribute cookies.
6 7 8 |
# File 'lib/synapse_client/api_operations/response.rb', line 6 def @cookies end |
#data ⇒ Object (readonly)
Returns the value of attribute data.
4 5 6 |
# File 'lib/synapse_client/api_operations/response.rb', line 4 def data @data end |
#error_msg ⇒ Object (readonly)
Returns the value of attribute error_msg.
5 6 7 |
# File 'lib/synapse_client/api_operations/response.rb', line 5 def error_msg @error_msg end |
#status_code ⇒ Object (readonly)
Returns the value of attribute status_code.
7 8 9 |
# File 'lib/synapse_client/api_operations/response.rb', line 7 def status_code @status_code end |
#success ⇒ Object (readonly) Also known as: successful?
Returns the value of attribute success.
8 9 10 |
# File 'lib/synapse_client/api_operations/response.rb', line 8 def success @success end |