Class: AbiCoderRb::Uint
Instance Attribute Summary collapse
-
#bits ⇒ Object
readonly
Returns the value of attribute bits.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #format ⇒ Object
-
#initialize(bits = 256) ⇒ Uint
constructor
A new instance of Uint.
- #size ⇒ Object
Methods inherited from Type
Constructor Details
#initialize(bits = 256) ⇒ Uint
Returns a new instance of Uint.
87 88 89 |
# File 'lib/abi_coder_rb/type/types.rb', line 87 def initialize(bits = 256) @bits = bits end |
Instance Attribute Details
#bits ⇒ Object (readonly)
Returns the value of attribute bits.
85 86 87 |
# File 'lib/abi_coder_rb/type/types.rb', line 85 def bits @bits end |
Instance Method Details
#==(other) ⇒ Object
99 100 101 |
# File 'lib/abi_coder_rb/type/types.rb', line 99 def ==(other) other.is_a?(Uint) && @bits == other.bits end |
#format ⇒ Object
95 96 97 |
# File 'lib/abi_coder_rb/type/types.rb', line 95 def format "uint#{@bits}" end |
#size ⇒ Object
91 92 93 |
# File 'lib/abi_coder_rb/type/types.rb', line 91 def size 32 end |