Sha256: e2b7be24724cf077ae623570779eeba0cbc50077afa07897d1e378b7b4415a72
Contents?: true
Size: 554 Bytes
Versions: 15
Compression:
Stored size: 554 Bytes
Contents
module Neo4j::Shared module Identity def ==(o) o.class == self.class && o.id == id end alias_method :eql?, :== # Returns an Enumerable of all (primary) key attributes # or nil if model.persisted? is false def to_key persisted? ? [id] : nil end # @return [Fixnum, nil] the neo4j id of the node if persisted or nil def neo_id _persisted_obj ? _persisted_obj.neo_id : nil end def id id = neo_id id.is_a?(Integer) ? id : nil end def hash id.hash end end end
Version data entries
15 entries across 15 versions & 1 rubygems