Class: Etherlite::Types::ArrayDynamic
- Defined in:
- lib/etherlite/types/array_dynamic.rb
Instance Attribute Summary
Attributes inherited from ArrayBase
Instance Method Summary collapse
Methods inherited from ArrayBase
Methods inherited from Base
#decode, #dynamic?, #fixed?, #size
Constructor Details
This class inherits a constructor from Etherlite::Types::ArrayBase
Instance Method Details
#encode(_value) ⇒ Object
7 8 9 10 11 |
# File 'lib/etherlite/types/array_dynamic.rb', line 7 def encode(_value) raise ArgumentError, "expected an array for #{signature}" unless _value.is_a? Array Etherlite::Utils.uint_to_hex(_value.size) + encode_values(_value) end |
#signature ⇒ Object
3 4 5 |
# File 'lib/etherlite/types/array_dynamic.rb', line 3 def signature "#{subtype.signature}[]" end |