Module: JSI::FingerprintHash

Included in:
Base, JSON::Node, JSON::Pointer, MetaschemaNode
Defined in:
lib/jsi/util.rb

Instance Method Summary collapse

Instance Method Details

#==(other) ⇒ Object Also known as: eql?

overrides BasicObject#==



74
75
76
# File 'lib/jsi/util.rb', line 74

def ==(other)
  object_id == other.object_id || (other.respond_to?(:jsi_fingerprint) && other.jsi_fingerprint == self.jsi_fingerprint)
end

#hashObject

overrides Kernel#hash



81
82
83
# File 'lib/jsi/util.rb', line 81

def hash
  jsi_fingerprint.hash
end