Class: ABI::Array

Inherits:
Type
  • Object
show all
Defined in:
lib/abicoder/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.



102
103
104
# File 'lib/abicoder/types.rb', line 102

def initialize( subtype )
  @subtype = subtype
end

Instance Attribute Details

#subtypeObject (readonly)

Returns the value of attribute subtype.



101
102
103
# File 'lib/abicoder/types.rb', line 101

def subtype
  @subtype
end

Instance Method Details

#==(another_type) ⇒ Object



107
108
109
# File 'lib/abicoder/types.rb', line 107

def ==(another_type)
  another_type.kind_of?( Array ) && @subtype == another_type.subtype
end

#formatObject



106
# File 'lib/abicoder/types.rb', line 106

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

#sizeObject

note: dynamic (not known at compile-time)



105
# File 'lib/abicoder/types.rb', line 105

def size() nil; end