Class: Web3::Eth::Abi::Tuple

Inherits:
Type
  • Object
show all
Defined in:
lib/web3/eth/abi/type.rb

Instance Attribute Summary collapse

Attributes inherited from Type

#base, #dims, #sub

Instance Method Summary collapse

Methods inherited from Type

#dynamic?, parse, size_type, #subtype

Constructor Details

#initialize(types, dims) ⇒ Tuple

Returns a new instance of Tuple.



127
128
129
130
# File 'lib/web3/eth/abi/type.rb', line 127

def initialize types, dims
  super('tuple', '', dims)
  @types = types
end

Instance Attribute Details

#typesObject (readonly)

Returns the value of attribute types.



126
127
128
# File 'lib/web3/eth/abi/type.rb', line 126

def types
  @types
end

Instance Method Details

#==(another_type) ⇒ Object



132
133
134
135
136
# File 'lib/web3/eth/abi/type.rb', line 132

def ==(another_type)
  another_type.kind_of?(Tuple) &&
      another_type.types == types &&
      another_type.dims == dims
end

#sizeObject



138
139
140
# File 'lib/web3/eth/abi/type.rb', line 138

def size
  nil
end