Sha256: 3107c69563bf714f2249f47af03556cc8d59c7efa8313264f7615a85b97b53b5
Contents?: true
Size: 833 Bytes
Versions: 25
Compression:
Stored size: 833 Bytes
Contents
require 'neo4j/core/wrappable' require 'active_support/core_ext/hash/keys' module Neo4j module Core class Relationship attr_reader :id, :type, :properties, :start_node_id, :end_node_id alias props properties alias neo_id id alias rel_type type include Wrappable def initialize(id, type, properties, start_node_id = nil, end_node_id = nil) @id = id @type = type.to_sym unless type.nil? @properties = properties.symbolize_keys @start_node_id = start_node_id @end_node_id = end_node_id end class << self def from_url(url, properties = {}) id = url.split('/')[-1].to_i type = nil # unknown properties = properties new(id, type, properties, nil, nil) end end end end end
Version data entries
25 entries across 25 versions & 1 rubygems