Class: RailsGraph::Graph::Relationships::Association
- Inherits:
-
RailsGraph::Graph::Relationship
- Object
- Entity
- RailsGraph::Graph::Relationship
- RailsGraph::Graph::Relationships::Association
- Defined in:
- lib/rails_graph/graph/relationships/association.rb
Instance Attribute Summary collapse
-
#association ⇒ Object
readonly
Returns the value of attribute association.
Attributes inherited from RailsGraph::Graph::Relationship
Attributes inherited from Entity
Instance Method Summary collapse
-
#initialize(association, source, target) ⇒ Association
constructor
A new instance of Association.
Methods inherited from RailsGraph::Graph::Relationship
Methods inherited from Entity
Constructor Details
#initialize(association, source, target) ⇒ Association
Returns a new instance of Association.
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/rails_graph/graph/relationships/association.rb', line 11 def initialize(association, source, target) @association = association super( source: source, target: target, label: association.macro.to_s.camelize, name: association.name.to_s, properties: build_properties ) end |
Instance Attribute Details
#association ⇒ Object (readonly)
Returns the value of attribute association.
9 10 11 |
# File 'lib/rails_graph/graph/relationships/association.rb', line 9 def association @association end |