Class: AbstractGraph::Composition::Vertex

Inherits:
Object
  • Object
show all
Defined in:
lib/abstract_graph/composition/vertex.rb,
lib/abstract_graph/composition/vertex/initialize.rb

Overview

public Vertex class

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#nameObject

Returns the value of attribute name.



8
9
10
# File 'lib/abstract_graph/composition/vertex.rb', line 8

def name
  @name
end

#valueObject

Returns the value of attribute value.



9
10
11
# File 'lib/abstract_graph/composition/vertex.rb', line 9

def value
  @value
end