Class: QRPC::Protocol::Object::Response
- Inherits:
-
Abstract::Response
- Object
- Abstract::Object
- Abstract::Response
- QRPC::Protocol::Object::Response
- Defined in:
- lib/qrpc/protocol/object/response.rb
Overview
Object response implementation.
Instance Attribute Summary
Attributes inherited from Abstract::Object
Class Method Summary collapse
-
.parse(raw) ⇒ Response
Parses the data for new object.
Instance Method Summary collapse
-
#error ⇒ Exception
Returns response error.
-
#error? ⇒ Boolean
Indicates, error state of the response.
-
#id ⇒ Object
Returns ID of the response.
-
#result ⇒ Object
Returns response result.
-
#serialize ⇒ Response
Serializes object to the resultant form.
Methods inherited from Abstract::Response
Methods inherited from Abstract::Object
Constructor Details
This class inherits a constructor from QRPC::Protocol::Abstract::Response
Class Method Details
.parse(raw) ⇒ Response
Parses the data for new object.
41 42 43 |
# File 'lib/qrpc/protocol/object/response.rb', line 41 def self.parse(raw) self::new(raw.) end |
Instance Method Details
#error ⇒ Exception
Returns response error.
77 78 79 |
# File 'lib/qrpc/protocol/object/response.rb', line 77 def error @options.error end |
#error? ⇒ Boolean
Indicates, error state of the response.
68 69 70 |
# File 'lib/qrpc/protocol/object/response.rb', line 68 def error? not self.error.nil? end |
#id ⇒ Object
Returns ID of the response.
59 60 61 |
# File 'lib/qrpc/protocol/object/response.rb', line 59 def id @options.request.id end |
#result ⇒ Object
Returns response result.
86 87 88 |
# File 'lib/qrpc/protocol/object/response.rb', line 86 def result @options.result end |
#serialize ⇒ Response
Serializes object to the resultant form.
50 51 52 |
# File 'lib/qrpc/protocol/object/response.rb', line 50 def serialize self end |