class AbstractGraph::Composition::Vertex
public Vertex
class
Attributes
name[R]
value[RW]
Public Class Methods
new(name="", value=nil)
click to toggle source
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
# File lib/abstract_graph/composition/vertex/initialize.rb, line 13 def initialize (name="", value=nil) @name = name @value = value end
Public Instance Methods
name=(name)
click to toggle source
d: Set the name of vertex. a: Throw an ArgumentError if the name is not a string t: constant p: name should be string r: The name
# File lib/abstract_graph/composition/vertex.rb, line 16 def name=(name) raise ArgumentError if name.class != String @name = name end