Class: Puppet::SimpleGraph::VertexWrapper

Inherits:
Object
  • Object
show all
Defined in:
lib/vendor/puppet/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.



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

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

Instance Attribute Details

#adjacenciesObject (readonly)

Returns the value of attribute adjacencies.



487
488
489
# File 'lib/vendor/puppet/simple_graph.rb', line 487

def adjacencies
  @adjacencies
end

#vertexObject (readonly)

Returns the value of attribute vertex.



487
488
489
# File 'lib/vendor/puppet/simple_graph.rb', line 487

def vertex
  @vertex
end

Instance Method Details

#inspectObject



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

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