Class: RailsGraph::Graph::Entity
- Inherits:
-
Object
- Object
- RailsGraph::Graph::Entity
- Defined in:
- lib/rails_graph/graph/entity.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#properties ⇒ Object
readonly
Returns the value of attribute properties.
Instance Method Summary collapse
- #identifier ⇒ Object
-
#initialize(name:, id: SecureRandom.uuid, properties: {}) ⇒ Entity
constructor
A new instance of Entity.
Constructor Details
#initialize(name:, id: SecureRandom.uuid, properties: {}) ⇒ Entity
Returns a new instance of Entity.
10 11 12 13 14 |
# File 'lib/rails_graph/graph/entity.rb', line 10 def initialize(name:, id: SecureRandom.uuid, properties: {}) @id = id @name = name @properties = properties end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
8 9 10 |
# File 'lib/rails_graph/graph/entity.rb', line 8 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
8 9 10 |
# File 'lib/rails_graph/graph/entity.rb', line 8 def name @name end |
#properties ⇒ Object (readonly)
Returns the value of attribute properties.
8 9 10 |
# File 'lib/rails_graph/graph/entity.rb', line 8 def properties @properties end |
Instance Method Details
#identifier ⇒ Object
16 17 18 |
# File 'lib/rails_graph/graph/entity.rb', line 16 def identifier id end |