Class: Neo4j::ActiveNode::HasN::Association::RelFactory

Inherits:
Object
  • Object
show all
Defined in:
lib/neo4j/active_node/has_n/association/rel_factory.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.create(start_object, other_node_or_nodes, properties, association) ⇒ Object



9
10
11
12
# File 'lib/neo4j/active_node/has_n/association/rel_factory.rb', line 9

def self.create(start_object, other_node_or_nodes, properties, association)
  factory = new(start_object, other_node_or_nodes, properties, association)
  factory._create_relationship
end

Instance Method Details

#_create_relationshipObject



14
15
16
17
# File 'lib/neo4j/active_node/has_n/association/rel_factory.rb', line 14

def _create_relationship
  creator = association.relationship_class ? :rel_class : :factory
  send(:"_create_relationship_with_#{creator}")
end