Module: Neo4j::Wrapper::Equal

Included in:
NodeMixin, RelationshipMixin
Defined in:
lib/neo4j-wrapper/equal/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

- (Boolean) eql?(other_node) Also known as: ==

check that this and the other node is both the same class and has the same node/relationship id.

Returns:

  • (Boolean)


9
10
11
# File 'lib/neo4j-wrapper/equal/equal.rb', line 9

def eql?(other_node)
  other_node.respond_to?(:neo_id) && neo_id == other_node.neo_id
end