Class: AbiCoderRb::Array

Inherits:
Type
  • Object
show all
Defined in:
lib/abi_coder_rb/type/types.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Type

#dynamic?, parse

Constructor Details

#initialize(inner_type) ⇒ Array

Returns a new instance of Array.



135
136
137
# File 'lib/abi_coder_rb/type/types.rb', line 135

def initialize(inner_type)
  @inner_type = inner_type
end

Instance Attribute Details

#inner_typeObject (readonly)

Returns the value of attribute inner_type.



133
134
135
# File 'lib/abi_coder_rb/type/types.rb', line 133

def inner_type
  @inner_type
end

Instance Method Details

#==(other) ⇒ Object



147
148
149
# File 'lib/abi_coder_rb/type/types.rb', line 147

def ==(other)
  other.is_a?(Array) && @inner_type == other.inner_type
end

#formatObject



143
144
145
# File 'lib/abi_coder_rb/type/types.rb', line 143

def format
  "#{@inner_type.format}[]"
end

#sizeObject



139
140
141
# File 'lib/abi_coder_rb/type/types.rb', line 139

def size
  nil
end