Class: GenericRelationship

Inherits:
Object
  • Object
show all
Includes:
N4j::Entity, N4j::Relationship
Defined in:
lib/n4j.rb

Class Method Summary collapse

Methods included from N4j::Relationship

#body_hash, #create_path, #entity_type, #initialize, #prerequisites, #type

Methods included from N4j::Entity

#connected_unsaved, #create_bundle, #dependent, #destroy, #destroy_bundle, #destroyed?, #from_neo4j, #from_neo4j_relative, #initialize, #load_neo4j_data, #needs_persist?, #note_update!, #persisted?, #place_in_batch, #place_in_batch=, #post_save, #prerequisites, #save

Class Method Details

.find_by_node_path(path) ⇒ Object



42
43
44
45
# File 'lib/n4j.rb', line 42

def self.find_by_node_path(path)
  result = N4j.batch([{:to => path ,:method => 'GET'}])
  result.first['body'].collect {|r| GenericRelationship.new(r) }
end