Class: AbiCoderRb::Type

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

Direct Known Subclasses

Address, Array, Bool, Bytes, FixedArray, FixedBytes, Int, String, Tuple, Uint

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.parse(str) ⇒ Object



6
7
8
9
# File 'lib/abi_coder_rb/type/parse.rb', line 6

def parse(str)
  abi_type_element = AbiCoderRb::AbiParser.new(str).parse
  create_type(abi_type_element)
end

Instance Method Details

#dynamic?Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/abi_coder_rb/type/types.rb', line 7

def dynamic?
  size.nil?
end

#formatObject

Raises:

  • (NotImplementedError)


11
12
13
# File 'lib/abi_coder_rb/type/types.rb', line 11

def format
  raise NotImplementedError, "format method not defined for #{self.class.name}"
end

#sizeObject

Raises:

  • (NotImplementedError)


3
4
5
# File 'lib/abi_coder_rb/type/types.rb', line 3

def size
  raise NotImplementedError, "size method not defined for #{self.class.name}"
end