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.



492
493
494
495
# File 'lib/puppet/graph/simple_graph.rb', line 492

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

Instance Attribute Details

#adjacenciesObject (readonly)



491
492
493
# File 'lib/puppet/graph/simple_graph.rb', line 491

def adjacencies
  @adjacencies
end

#vertexObject (readonly)



491
492
493
# File 'lib/puppet/graph/simple_graph.rb', line 491

def vertex
  @vertex
end

Instance Method Details

#inspectObject



497
498
499
# File 'lib/puppet/graph/simple_graph.rb', line 497

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