Sha256: 4cb26564d9855829aa2e17fcdaf2898894e79ddc74ae5cf7b88d308ab00e4e2c
Contents?: true
Size: 714 Bytes
Versions: 30
Compression:
Stored size: 714 Bytes
Contents
module ActiveGraph module Shared module Identity def ==(other) other.class == self.class && other.id == id end alias eql? == # Returns an Enumerable of all (primary) key attributes # or nil if model.persisted? is false def to_key _persisted_obj ? [id] : nil end # @return [Integer, nil] the neo4j id of the node if persisted or nil def neo_id _persisted_obj ? _persisted_obj.id : nil end def id if self.class.id_property_name send(self.class.id_property_name) else # Relationship neo_id end end def hash id.hash end end end end
Version data entries
30 entries across 30 versions & 1 rubygems