Sha256: ac56357369f5c84efea9088eae73ac32731e2bf6f7b1f57da0a5587192e2f201
Contents?: true
Size: 363 Bytes
Versions: 4
Compression:
Stored size: 363 Bytes
Contents
# frozen_string_literal: true module Redgraph class Node attr_accessor :id, :label, :properties def initialize(label:, properties: {}) @label = label @properties = properties end def persisted? !id.nil? end def ==(other) super || other.instance_of?(self.class) && !id.nil? && other.id == id end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
redgraph-0.1.3 | lib/redgraph/node.rb |
redgraph-0.1.2 | lib/redgraph/node.rb |
redgraph-0.1.1 | lib/redgraph/node.rb |
redgraph-0.1.0 | lib/redgraph/node.rb |