Class: Puppet::Graph::SimpleGraph::VertexWrapper

Inherits:
Object
  • Object
show all
Defined in:
lib/puppet/graph/simple_graph.rb

Overview

Stub class to allow graphs to be represented in YAML using the old (version 2.6) format.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(vertex, adjacencies) ⇒ VertexWrapper

Returns a new instance of VertexWrapper.



484
485
486
487
# File 'lib/puppet/graph/simple_graph.rb', line 484

def initialize(vertex, adjacencies)
  @vertex = vertex
  @adjacencies = adjacencies
end

Instance Attribute Details

#adjacenciesObject (readonly)



483
484
485
# File 'lib/puppet/graph/simple_graph.rb', line 483

def adjacencies
  @adjacencies
end

#vertexObject (readonly)



483
484
485
# File 'lib/puppet/graph/simple_graph.rb', line 483

def vertex
  @vertex
end

Instance Method Details

#inspectObject



489
490
491
# File 'lib/puppet/graph/simple_graph.rb', line 489

def inspect
  { :@adjacencies => @adjacencies, :@vertex => @vertex.to_s }.inspect
end