Module: JSI::Util::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#==



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

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

#hashObject

overrides Kernel#hash



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

def hash
  jsi_fingerprint.hash
end