Class: AbiCoderRb::Int
Instance Attribute Summary collapse
-
#bits ⇒ Object
readonly
Returns the value of attribute bits.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #format ⇒ Object
-
#initialize(bits = 256) ⇒ Int
constructor
A new instance of Int.
- #size ⇒ Object
Methods inherited from Type
Constructor Details
#initialize(bits = 256) ⇒ Int
Returns a new instance of Int.
67 68 69 |
# File 'lib/abi_coder_rb/type/types.rb', line 67 def initialize(bits = 256) @bits = bits end |
Instance Attribute Details
#bits ⇒ Object (readonly)
Returns the value of attribute bits.
65 66 67 |
# File 'lib/abi_coder_rb/type/types.rb', line 65 def bits @bits end |
Instance Method Details
#==(other) ⇒ Object
79 80 81 |
# File 'lib/abi_coder_rb/type/types.rb', line 79 def ==(other) other.is_a?(Int) && @bits == other.bits end |
#format ⇒ Object
75 76 77 |
# File 'lib/abi_coder_rb/type/types.rb', line 75 def format "int#{@bits}" end |
#size ⇒ Object
71 72 73 |
# File 'lib/abi_coder_rb/type/types.rb', line 71 def size 32 end |