Class: Puppet::Pops::Lookup::ExplainDataProvider
Instance Attribute Summary
#event, #key, #parent, #value
Instance Method Summary
collapse
#dump_outcome, #dump_value, #found, #found_in_defaults, #found_in_overrides, #increase_indent, #module_not_found, #not_found, #path_not_found, #result
Methods inherited from ExplainNode
#branches, #to_s
Constructor Details
Returns a new instance of ExplainDataProvider.
266
267
268
269
|
# File 'lib/puppet/pops/lookup/explainer.rb', line 266
def initialize(parent, provider)
super(parent)
@provider = provider
end
|
Instance Method Details
#dump_on(io, indent, first_indent) ⇒ Object
271
272
273
274
275
276
277
|
# File 'lib/puppet/pops/lookup/explainer.rb', line 271
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 << "\"\n" if @provider.respond_to?(:config_path)
branches.each {|b| b.dump_on(io, indent, indent)}
dump_outcome(io, indent)
end
|
279
280
281
282
283
284
|
# File 'lib/puppet/pops/lookup/explainer.rb', line 279
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
|
286
287
288
|
# File 'lib/puppet/pops/lookup/explainer.rb', line 286
def type
:data_provider
end
|