Class: RailsGraph::Graph::Nodes::Model
- Inherits:
-
RailsGraph::Graph::Node
- Object
- Entity
- RailsGraph::Graph::Node
- RailsGraph::Graph::Nodes::Model
- Defined in:
- lib/rails_graph/graph/nodes/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) ⇒ Model
constructor
A new instance of Model.
Methods inherited from RailsGraph::Graph::Node
Constructor Details
#initialize(model) ⇒ Model
11 12 13 14 15 |
# File 'lib/rails_graph/graph/nodes/model.rb', line 11 def initialize(model) @model = model super(labels: "Model", name: model.name, properties: build_properties) end |
Instance Attribute Details
#model ⇒ Object (readonly)
Returns the value of attribute model.
9 10 11 |
# File 'lib/rails_graph/graph/nodes/model.rb', line 9 def model @model end |
Instance Method Details
#identifier ⇒ Object
17 18 19 |
# File 'lib/rails_graph/graph/nodes/model.rb', line 17 def identifier RailsGraph::Helpers::Models.identifier(model) end |