Class: Puppet::Pops::Lookup::ExplainModule

Inherits:
ExplainTreeNode show all
Defined in:
lib/puppet/pops/lookup/explainer.rb

Instance Attribute Summary

Attributes inherited from ExplainTreeNode

#event, #key, #parent, #value

Instance Method Summary collapse

Methods inherited from ExplainTreeNode

#dump_outcome, #dump_value, #found, #found_in_defaults, #found_in_overrides, #increase_indent, #location_not_found, #not_found, #result, #to_hash, #to_s

Methods inherited from ExplainNode

#branches, #dump_texts, #explain, #inspect, #text, #to_hash, #to_s

Constructor Details

#initialize(parent, module_name) ⇒ ExplainModule

Returns a new instance of ExplainModule.



212
213
214
215
# File 'lib/puppet/pops/lookup/explainer.rb', line 212

def initialize(parent, module_name)
  super(parent)
  @module_name = module_name
end

Instance Method Details

#dump_on(io, indent, first_indent) ⇒ Object



217
218
219
220
221
222
223
224
# File 'lib/puppet/pops/lookup/explainer.rb', line 217

def dump_on(io, indent, first_indent)
  case @event
  when :module_not_found
    io << indent << 'Module "' << @module_name << "\" not found\n"
  when :module_provider_not_found
    io << indent << 'Module data provider for module "' << @module_name << "\" not found\n"
  end
end

#module_not_foundObject



226
227
228
# File 'lib/puppet/pops/lookup/explainer.rb', line 226

def module_not_found
  @event = :module_not_found
end

#module_provider_not_foundObject



230
231
232
# File 'lib/puppet/pops/lookup/explainer.rb', line 230

def module_provider_not_found
  @event = :module_provider_not_found
end

#typeObject



234
235
236
# File 'lib/puppet/pops/lookup/explainer.rb', line 234

def type
  :module
end