Class: RpcResult
- Inherits:
-
Object
- Object
- RpcResult
- Defined in:
- lib/calimero/types/rpc.rb
Instance Attribute Summary collapse
-
#error ⇒ Object
Returns the value of attribute error.
-
#result ⇒ Object
Returns the value of attribute result.
Instance Method Summary collapse
-
#initialize(result: nil, error: nil) ⇒ RpcResult
constructor
A new instance of RpcResult.
- #to_h ⇒ Object
Constructor Details
#initialize(result: nil, error: nil) ⇒ RpcResult
Returns a new instance of RpcResult.
63 64 65 66 |
# File 'lib/calimero/types/rpc.rb', line 63 def initialize(result: nil, error: nil) @result = result @error = error end |
Instance Attribute Details
#error ⇒ Object
Returns the value of attribute error.
61 62 63 |
# File 'lib/calimero/types/rpc.rb', line 61 def error @error end |
#result ⇒ Object
Returns the value of attribute result.
61 62 63 |
# File 'lib/calimero/types/rpc.rb', line 61 def result @result end |
Instance Method Details
#to_h ⇒ Object
68 69 70 71 72 73 |
# File 'lib/calimero/types/rpc.rb', line 68 def to_h { result: @result, error: @error, } end |