class AMA::Entity::Mapper::Type::Aux::HashTuple
Simple class to store paired data items
Attributes
key[RW]
value[RW]
Public Class Methods
new(key: nil, value: nil)
click to toggle source
# File lib/ama-entity-mapper/type/aux/hash_tuple.rb, line 13 def initialize(key: nil, value: nil) @key = key @value = value end
Public Instance Methods
==(other)
click to toggle source
# File lib/ama-entity-mapper/type/aux/hash_tuple.rb, line 27 def ==(other) eql?(other) end
eql?(other)
click to toggle source
# File lib/ama-entity-mapper/type/aux/hash_tuple.rb, line 22 def eql?(other) return false unless other.is_a?(HashTuple) @key == other.key && @value == other.value end
hash()
click to toggle source
# File lib/ama-entity-mapper/type/aux/hash_tuple.rb, line 18 def hash @key.hash ^ @value.hash end