Class: AbiCoderRb::FixedBytes
- Defined in:
- lib/abi_coder_rb/type/types.rb
Instance Attribute Summary collapse
-
#length ⇒ Object
readonly
Returns the value of attribute length.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #format ⇒ Object
-
#initialize(length) ⇒ FixedBytes
constructor
A new instance of FixedBytes.
- #size ⇒ Object
Methods inherited from Type
Constructor Details
#initialize(length) ⇒ FixedBytes
Returns a new instance of FixedBytes.
47 48 49 |
# File 'lib/abi_coder_rb/type/types.rb', line 47 def initialize(length) @length = length end |
Instance Attribute Details
#length ⇒ Object (readonly)
Returns the value of attribute length.
45 46 47 |
# File 'lib/abi_coder_rb/type/types.rb', line 45 def length @length end |
Instance Method Details
#==(other) ⇒ Object
59 60 61 |
# File 'lib/abi_coder_rb/type/types.rb', line 59 def ==(other) other.is_a?(FixedBytes) && @length == other.length end |
#format ⇒ Object
55 56 57 |
# File 'lib/abi_coder_rb/type/types.rb', line 55 def format "bytes#{@length}" end |
#size ⇒ Object
51 52 53 |
# File 'lib/abi_coder_rb/type/types.rb', line 51 def size 32 end |