Exception: Puppet::ModuleTool::Errors::UnknownModuleError

Inherits:
UpgradeError show all
Defined in:
lib/vendor/puppet/module_tool/errors/upgrader.rb

Instance Method Summary collapse

Methods inherited from ModuleToolError

#v, #vstring

Constructor Details

#initialize(options) ⇒ UnknownModuleError

Returns a new instance of UnknownModuleError.



40
41
42
43
44
45
46
# File 'lib/vendor/puppet/module_tool/errors/upgrader.rb', line 40

def initialize(options)
  @module_name       = options[:module_name]
  @installed_version = options[:installed_version]
  @requested_version = options[:requested_version]
  @repository        = options[:repository]
  super "Could not upgrade '#{@module_name}'; module is unknown to #{@repository}"
end

Instance Method Details

#multilineObject



48
49
50
51
52
53
# File 'lib/vendor/puppet/module_tool/errors/upgrader.rb', line 48

def multiline
  message = []
  message << "Could not upgrade module '#{@module_name}' (#{vstring})"
  message << "  Module '#{@module_name}' does not exist on #{@repository}"
  message.join("\n")
end