Class: Eth::Contract::FunctionOutput

Inherits:
Object
  • Object
show all
Defined in:
lib/eth/contract/function_output.rb

Overview

Provide classes for contract function output.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ FunctionOutput

Constructor of the Eth::Contract::FunctionOutput class.

Parameters:

  • data (Hash)

    contract abi data.



27
28
29
30
# File 'lib/eth/contract/function_output.rb', line 27

def initialize(data)
  @type = Eth::Abi::Type.parse(data["type"])
  @name = data["name"]
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



22
23
24
# File 'lib/eth/contract/function_output.rb', line 22

def name
  @name
end

#typeObject

Returns complete types with subtypes, e.g., uint256.



33
34
35
# File 'lib/eth/contract/function_output.rb', line 33

def type
  @type
end