Method: ABI::Type#size

Defined in:
lib/abicoder/types.rb

#sizeInteger, NilClass

Get the static size of a type, or nil if dynamic.

Returns:

  • (Integer, NilClass)

    size of static type, or nil for dynamic type

Raises:

  • (ArgumentError)


21
22
23
24
# File 'lib/abicoder/types.rb', line 21

def size
  ## check/todo: what error to raise for not implemented / method not defined???
  raise ArgumentError, "no required size method defined for Type subclass #{self.class.name}; sorry"
end