Class: ActiveGraph::Node::HasN::Association::RelWrapper

Inherits:
Object
  • Object
show all
Includes:
Shared::Cypher::CreateMethod, Shared::Cypher::RelIdentifiers
Defined in:
lib/active_graph/node/has_n/association/rel_wrapper.rb

Overview

Provides the interface needed to interact with the Relationship query factory.

Instance Attribute Summary collapse

Instance Method Summary collapse

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/active_graph/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

#propertiesObject Also known as: props_for_create

Returns the value of attribute properties.



8
9
10
# File 'lib/active_graph/node/has_n/association/rel_wrapper.rb', line 8

def properties
  @properties
end

#typeObject (readonly)

Returns the value of attribute type.



7
8
9
# File 'lib/active_graph/node/has_n/association/rel_wrapper.rb', line 7

def type
  @type
end

Instance Method Details

#persisted?Boolean

Returns:



19
20
21
# File 'lib/active_graph/node/has_n/association/rel_wrapper.rb', line 19

def persisted?
  false
end