Class: ABI::Type
- Inherits:
-
Object
- Object
- ABI::Type
- Defined in:
- lib/abicoder/types.rb,
lib/abicoder/parser.rb
Direct Known Subclasses
Address, Array, Bool, Bytes, FixedArray, FixedBytes, Int, String, Tuple, Uint
Defined Under Namespace
Classes: ParseError, Parser
Class Method Summary collapse
-
.parse(type) ⇒ Object
convenience helper.
Instance Method Summary collapse
- #dynamic? ⇒ Boolean
- #format ⇒ Object
-
#size ⇒ Integer, NilClass
Get the static size of a type, or nil if dynamic.
Class Method Details
Instance Method Details
#dynamic? ⇒ Boolean
25 |
# File 'lib/abicoder/types.rb', line 25 def dynamic?() size.nil?; end |
#format ⇒ Object
27 28 29 30 |
# File 'lib/abicoder/types.rb', line 27 def format ## check/todo: what error to raise for not implemented / method not defined??? raise ArgumentError, "no required format method defined for Type subclass #{self.class.name}; sorry" end |
#size ⇒ Integer, NilClass
Get the static size of a type, or nil if dynamic.
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 |