class Puppet::Pops::Lookup::ExplainDataProvider

Public Class Methods

new(parent, provider) click to toggle source
    # File lib/puppet/pops/lookup/explainer.rb
339 def initialize(parent, provider)
340   super(parent)
341   @provider = provider
342 end

Public Instance Methods

dump_on(io, indent, first_indent) click to toggle source
    # File lib/puppet/pops/lookup/explainer.rb
344 def dump_on(io, indent, first_indent)
345   io << first_indent << @provider.name << "\n"
346   indent = increase_indent(indent)
347   if @provider.respond_to?(:config_path)
348     path = @provider.config_path
349     io << indent << 'Using configuration "' << path.to_s << "\"\n" unless path.nil?
350   end
351   branches.each {|b| b.dump_on(io, indent, indent)}
352   dump_outcome(io, indent)
353 end
to_hash() click to toggle source
    # File lib/puppet/pops/lookup/explainer.rb
355 def to_hash
356   hash = super
357   hash[:name] = @provider.name
358   if @provider.respond_to?(:config_path)
359     path = @provider.config_path
360     hash[:configuration_path] = path.to_s unless path.nil?
361   end
362   hash[:module] = @provider.module_name if @provider.is_a?(ModuleDataProvider)
363   hash
364 end
type() click to toggle source
    # File lib/puppet/pops/lookup/explainer.rb
366 def type
367   :data_provider
368 end