Class: Neo4j::ActiveNode::HasN::Association::RelWrapper
- Inherits:
-
Object
- Object
- Neo4j::ActiveNode::HasN::Association::RelWrapper
- Defined in:
- lib/neo4j/active_node/has_n/association/rel_wrapper.rb
Overview
Provides the interface needed to interact with the ActiveRel query factory.
Instance Attribute Summary collapse
-
#properties ⇒ Object
(also: #props_for_create)
Returns the value of attribute properties.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(association, properties = {}) ⇒ RelWrapper
constructor
A new instance of RelWrapper.
- #persisted? ⇒ Boolean
Methods included from Shared::Cypher::CreateMethod
#create_method, #creates_unique, #creates_unique?, #creates_unique_option
Constructor Details
#initialize(association, properties = {}) ⇒ RelWrapper
Returns a new instance of RelWrapper.
12 13 14 15 16 17 |
# File 'lib/neo4j/active_node/has_n/association/rel_wrapper.rb', line 12 def initialize(association, properties = {}) @association = association @properties = properties @type = association.relationship_type(true) creates_unique(association.creates_unique_option) if association.unique? end |
Instance Attribute Details
#properties ⇒ Object Also known as: props_for_create
Returns the value of attribute properties.
8 9 10 |
# File 'lib/neo4j/active_node/has_n/association/rel_wrapper.rb', line 8 def properties @properties end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
7 8 9 |
# File 'lib/neo4j/active_node/has_n/association/rel_wrapper.rb', line 7 def type @type end |
Instance Method Details
#persisted? ⇒ Boolean
19 20 21 |
# File 'lib/neo4j/active_node/has_n/association/rel_wrapper.rb', line 19 def persisted? false end |