Class: EthereumContractABI::ContractInterface::Input
- Inherits:
-
Object
- Object
- EthereumContractABI::ContractInterface::Input
- Defined in:
- lib/ethereum-contract-abi/contract/input.rb
Instance Attribute Summary collapse
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #encode_value(value) ⇒ Object
-
#initialize(name, type) ⇒ Input
constructor
A new instance of Input.
Constructor Details
#initialize(name, type) ⇒ Input
Returns a new instance of Input.
6 7 8 9 |
# File 'lib/ethereum-contract-abi/contract/input.rb', line 6 def initialize(name, type) @name = name @type = type end |
Instance Attribute Details
#type ⇒ Object (readonly)
Returns the value of attribute type.
4 5 6 |
# File 'lib/ethereum-contract-abi/contract/input.rb', line 4 def type @type end |
Instance Method Details
#encode_value(value) ⇒ Object
11 12 13 |
# File 'lib/ethereum-contract-abi/contract/input.rb', line 11 def encode_value(value) @type.encode_value(value) end |