Class: PuppetX::PuppetLabs::Strings::Pops::YARDTransformer

Inherits:
Object
  • Object
show all
Defined in:
lib/puppet_x/puppetlabs/strings/pops/yard_transformer.rb

Overview

Note:

Currently, this class only extracts node, host class and type definitions.

Loosely based on the TreeDumper classes in Pops::Model. The responsibility of this class is to walk a Pops::Model and output objects that can be consumed by YARD handlers.

Instance Method Summary collapse

Constructor Details

#initializeYARDTransformer

Returns a new instance of YARDTransformer.



8
9
10
# File 'lib/puppet_x/puppetlabs/strings/pops/yard_transformer.rb', line 8

def initialize
  @transform_visitor = Puppet::Pops::Visitor.new(self, 'transform')
end

Instance Method Details

#transform(o) ⇒ Object



12
13
14
# File 'lib/puppet_x/puppetlabs/strings/pops/yard_transformer.rb', line 12

def transform(o)
  @transform_visitor.visit(o)
end