Class: AbiCoderRb::Array

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

Overview

class String

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Type

#dynamic?, parse

Constructor Details

#initialize(subtype) ⇒ Array

Returns a new instance of Array.



163
164
165
# File 'lib/abi_coder_rb/types.rb', line 163

def initialize(subtype)
  @subtype = subtype
end

Instance Attribute Details

#subtypeObject (readonly)

Returns the value of attribute subtype.



161
162
163
# File 'lib/abi_coder_rb/types.rb', line 161

def subtype
  @subtype
end

Instance Method Details

#==(other) ⇒ Object



176
177
178
# File 'lib/abi_coder_rb/types.rb', line 176

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

#formatObject



172
173
174
# File 'lib/abi_coder_rb/types.rb', line 172

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

#sizeObject

note: dynamic (not known at compile-time)



168
169
170
# File 'lib/abi_coder_rb/types.rb', line 168

def size
  nil
end