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
-
#eql?(other_node) ⇒ Boolean
(also: #==)
check that this and the other node is both the same class and has the same node/relationship id.
Instance Method Details
#eql?(other_node) ⇒ Boolean Also known as: ==
check that this and the other node is both the same class and has the same node/relationship id.
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 |