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



15
16
17
# File 'lib/neography/equal.rb', line 15

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

#eql?(o) ⇒ Boolean

Returns:

  • (Boolean)


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

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

#equal?(o) ⇒ Boolean

Returns:

  • (Boolean)


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

def equal?(o)
  eql?(o)
end