Class: Types::TypedReference
Constant Summary
Constants inherited from Typed
Types::Typed::ADDRESS_ZERO, Types::Typed::BYTES20_ZERO, Types::Typed::BYTES32_ZERO, Types::Typed::BYTES_ZERO, Types::Typed::INSCRIPTION_ID_ZERO, Types::Typed::STRING_ZERO
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#eql?(other) ⇒ Boolean
todo/check - hash == other.hash is default any way?? or is it object_id == other.object_id ????.
- #hash ⇒ Object
Methods inherited from Typed
#as_data, #as_json, dump, #serialize, serialize, #type, type
Instance Method Details
#==(other) ⇒ Object
102 103 104 105 106 |
# File 'lib/solidity/typed/typed.rb', line 102 def ==(other) other.is_a?(self.class) && type == other.type && @data == other.instance_variable_get( :@data ) end |
#eql?(other) ⇒ Boolean
todo/check - hash == other.hash is default any way??
or is it object_id == other.object_id ????
111 |
# File 'lib/solidity/typed/typed.rb', line 111 def eql?(other) hash == other.hash; end |
#hash ⇒ Object
108 |
# File 'lib/solidity/typed/typed.rb', line 108 def hash() [@data, type].hash; end |