Module: Neography::Equal

Included in:
Node, Relationship
Defined in:
lib/neography/equal.rb

Overview

This mixin is used for both nodes and relationships to decide if two entities are equal or not.

Instance Method Summary collapse

Instance Method Details

#==(o) ⇒ Object



11
12
13
# File 'lib/neography/equal.rb', line 11

def ==(o)
  eql?(o)
end

#eql?(o) ⇒ Boolean

Returns:

  • (Boolean)


6
7
8
9
# File 'lib/neography/equal.rb', line 6

def eql?(o)
  return false unless o.respond_to?(:neo_id)
  o.neo_id == neo_id
end