Class: RailsGraph::Graph::Nodes::AbstractModel
- Inherits:
-
RailsGraph::Graph::Node
- Object
- Entity
- RailsGraph::Graph::Node
- RailsGraph::Graph::Nodes::AbstractModel
- Defined in:
- lib/rails_graph/graph/nodes/abstract_model.rb
Instance Attribute Summary collapse
-
#model ⇒ Object
readonly
Returns the value of attribute model.
Attributes inherited from RailsGraph::Graph::Node
Attributes inherited from Entity
Instance Method Summary collapse
- #identifier ⇒ Object
-
#initialize(model) ⇒ AbstractModel
constructor
A new instance of AbstractModel.
Methods inherited from RailsGraph::Graph::Node
Constructor Details
#initialize(model) ⇒ AbstractModel
Returns a new instance of AbstractModel.
11 12 13 14 15 16 17 18 19 |
# File 'lib/rails_graph/graph/nodes/abstract_model.rb', line 11 def initialize(model) @model = model super( labels: "AbstractModel", name: model.name, properties: {} ) end |
Instance Attribute Details
#model ⇒ Object (readonly)
Returns the value of attribute model.
9 10 11 |
# File 'lib/rails_graph/graph/nodes/abstract_model.rb', line 9 def model @model end |
Instance Method Details
#identifier ⇒ Object
21 22 23 |
# File 'lib/rails_graph/graph/nodes/abstract_model.rb', line 21 def identifier RailsGraph::Helpers::Models.identifier(model) end |