Class: AbstractGraph::Composition::Vertex
- Inherits:
-
Object
- Object
- AbstractGraph::Composition::Vertex
- Defined in:
- lib/abstract_graph/composition/vertex.rb,
lib/abstract_graph/composition/vertex/initialize.rb
Overview
public Vertex class
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(name = "", value = nil) ⇒ Vertex
constructor
d: Create a vertex object with a name.
Constructor Details
#initialize(name = "", value = nil) ⇒ Vertex
d: Create a vertex object with a name. a: t: constant p: name is the name of our vertex, default to “”,
optional value that can be tracked
r: The vertex
13 14 15 16 |
# File 'lib/abstract_graph/composition/vertex/initialize.rb', line 13 def initialize (name="", value=nil) @name = name @value = value end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
8 9 10 |
# File 'lib/abstract_graph/composition/vertex.rb', line 8 def name @name end |
#value ⇒ Object
Returns the value of attribute value.
9 10 11 |
# File 'lib/abstract_graph/composition/vertex.rb', line 9 def value @value end |