Sha256: 937ebca4980289423328ca4955748dbf7cf6510882af616b03f02f1414d4bf7a
Contents?: true
Size: 675 Bytes
Versions: 17
Compression:
Stored size: 675 Bytes
Contents
require 'neo4j/core/wrappable' module Neo4j module Core class Node attr_reader :id, :labels, :properties alias_method :props, :properties include Wrappable # Perhaps we should deprecate this? alias_method :neo_id, :id def initialize(id, labels, properties = {}) @id = id @labels = labels.map(&:to_sym) unless labels.nil? @properties = properties end class << self def from_url(url, properties = {}) id = url.split('/')[-1].to_i labels = nil # unknown properties = properties new(id, labels, properties) end end end end end
Version data entries
17 entries across 17 versions & 1 rubygems