Class: PipeRpc::ResultResponse
- Defined in:
- lib/pipe_rpc/result_response.rb,
lib/pipe_rpc/client_request_result_response.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ ResultResponse
constructor
A new instance of ResultResponse.
- #to_h ⇒ Object
Constructor Details
#initialize(args = {}) ⇒ ResultResponse
3 4 5 6 |
# File 'lib/pipe_rpc/result_response.rb', line 3 def initialize(args = {}) @result = args.fetch(:result) @id = args.fetch(:id) end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
8 9 10 |
# File 'lib/pipe_rpc/result_response.rb', line 8 def id @id end |
#result ⇒ Object (readonly)
Returns the value of attribute result.
8 9 10 |
# File 'lib/pipe_rpc/result_response.rb', line 8 def result @result end |
Instance Method Details
#to_h ⇒ Object
10 11 12 |
# File 'lib/pipe_rpc/result_response.rb', line 10 def to_h { id: id, result: result } end |