Class: RpcResult

Inherits:
Object
  • Object
show all
Defined in:
lib/calimero/types/rpc.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#errorObject

Returns the value of attribute error.



61
62
63
# File 'lib/calimero/types/rpc.rb', line 61

def error
  @error
end

#resultObject

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_hObject



68
69
70
71
72
73
# File 'lib/calimero/types/rpc.rb', line 68

def to_h
  {
    result: @result,
    error: @error,
  }
end