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.
-
#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.
10 11 12 13 14 15 16 17 |
# File 'lib/synapse_client/api_operations/response.rb', line 10 def initialize(response, =nil) response = Map.new(response) @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.
7 8 9 |
# File 'lib/synapse_client/api_operations/response.rb', line 7 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 |
#success ⇒ Object (readonly) Also known as: successful?
Returns the value of attribute success.
6 7 8 |
# File 'lib/synapse_client/api_operations/response.rb', line 6 def success @success end |