Class: Toq::Response
Overview
Represents an RPC response.
It’s here only for formalization purposes, it’s not actually sent over the wire.
What is sent is a hash generated by Message#prepare_for_tx which is in the form of:
{
# result of the RPC call
'obj' => object
}
Instance Attribute Summary collapse
-
#exception ⇒ Hash
For all available exception types look at Exceptions.
-
#obj ⇒ Object
Return object of the Toq::Request#message.
Instance Method Summary collapse
Methods inherited from Message
#initialize, #merge!, #prepare_for_tx
Constructor Details
This class inherits a constructor from Toq::Message
Instance Attribute Details
#exception ⇒ Hash
For all available exception types look at Exceptions.
41 42 43 |
# File 'lib/toq/response.rb', line 41 def exception @exception end |
#obj ⇒ Object
Return object of the Toq::Request#message.
27 28 29 |
# File 'lib/toq/response.rb', line 27 def obj @obj end |
Instance Method Details
#async! ⇒ Object
51 52 53 |
# File 'lib/toq/response.rb', line 51 def async! @async = true end |
#async? ⇒ Boolean
47 48 49 |
# File 'lib/toq/response.rb', line 47 def async? !!@async end |
#exception? ⇒ Boolean
43 44 45 |
# File 'lib/toq/response.rb', line 43 def exception? !!exception end |