Class: Puppet::Pops::Lookup::ExplainDataProvider
Instance Attribute Summary
#event, #key, #parent, #value
Instance Method Summary
collapse
#dump_outcome, #dump_texts, #dump_value, #found, #found_in_defaults, #found_in_overrides, #increase_indent, #module_not_found, #not_found, #path_not_found, #result, #text
Methods inherited from ExplainNode
#branches, #to_s
Constructor Details
Returns a new instance of ExplainDataProvider.
330
331
332
333
|
# File 'lib/puppet/pops/lookup/explainer.rb', line 330
def initialize(parent, provider)
super(parent)
@provider = provider
end
|
Instance Method Details
#dump_on(io, indent, first_indent) ⇒ Object
335
336
337
338
339
340
341
|
# File 'lib/puppet/pops/lookup/explainer.rb', line 335
def dump_on(io, indent, first_indent)
io << first_indent << 'Data Provider "' << @provider.name << "\"\n"
indent = increase_indent(indent)
io << indent << 'ConfigurationPath "' << @provider.config_path.to_s << "\"\n" if @provider.respond_to?(:config_path)
branches.each {|b| b.dump_on(io, indent, indent)}
dump_outcome(io, indent)
end
|
343
344
345
346
347
348
|
# File 'lib/puppet/pops/lookup/explainer.rb', line 343
def to_hash
hash = super
hash[:name] = @provider.name
hash[:configuration_path] = @provider.config_path.to_s if @provider.respond_to?(:config_path)
hash
end
|
350
351
352
|
# File 'lib/puppet/pops/lookup/explainer.rb', line 350
def type
:data_provider
end
|