Class: ActiveGraph::Node::HasN::Association::RelWrapper
- Inherits:
 - 
      Object
      
        
- Object
 - ActiveGraph::Node::HasN::Association::RelWrapper
 
 
- 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
- 
  
    
      #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/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
#properties ⇒ Object 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  | 
  
#type ⇒ Object (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
      19 20 21  | 
    
      # File 'lib/active_graph/node/has_n/association/rel_wrapper.rb', line 19 def persisted? false end  |