Class: Eth::Contract::FunctionInput
- Inherits:
-
Object
- Object
- Eth::Contract::FunctionInput
- Defined in:
- lib/eth/contract/function_input.rb
Overview
Provide classes for contract function input.
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#raw_type ⇒ Object
Returns the value of attribute raw_type.
-
#type ⇒ Object
Returns complete types with subtypes, e.g.,
uint256
.
Instance Method Summary collapse
-
#initialize(data) ⇒ FunctionInput
constructor
Constructor of the FunctionInput class.
-
#parsed_type ⇒ Object
Returns parsed types.
Constructor Details
#initialize(data) ⇒ FunctionInput
Constructor of the Eth::Contract::FunctionInput class.
27 28 29 30 31 |
# File 'lib/eth/contract/function_input.rb', line 27 def initialize(data) @raw_type = data["type"] @type = Eth::Abi::Type.parse(data["type"], data["components"]) @name = data["name"] end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
22 23 24 |
# File 'lib/eth/contract/function_input.rb', line 22 def name @name end |
#raw_type ⇒ Object
Returns the value of attribute raw_type.
22 23 24 |
# File 'lib/eth/contract/function_input.rb', line 22 def raw_type @raw_type end |
#type ⇒ Object
Returns complete types with subtypes, e.g., uint256
.
34 35 36 |
# File 'lib/eth/contract/function_input.rb', line 34 def type @type end |
Instance Method Details
#parsed_type ⇒ Object
Returns parsed types.
39 40 41 |
# File 'lib/eth/contract/function_input.rb', line 39 def parsed_type @type end |