Exception: Puppet::ModuleTool::Errors::NoVersionMatchesError
- Inherits:
-
UninstallError
- Object
- StandardError
- ModuleToolError
- UninstallError
- Puppet::ModuleTool::Errors::NoVersionMatchesError
- Defined in:
- lib/vendor/puppet/module_tool/errors/uninstaller.rb
Instance Method Summary collapse
-
#initialize(options) ⇒ NoVersionMatchesError
constructor
A new instance of NoVersionMatchesError.
- #multiline ⇒ Object
Methods inherited from ModuleToolError
Constructor Details
#initialize(options) ⇒ NoVersionMatchesError
Returns a new instance of NoVersionMatchesError.
6 7 8 9 10 11 |
# File 'lib/vendor/puppet/module_tool/errors/uninstaller.rb', line 6 def initialize() @module_name = [:module_name] @modules = [:installed_modules] @version = [:version_range] super "Could not uninstall '#{@module_name}'; no installed version matches" end |
Instance Method Details
#multiline ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/vendor/puppet/module_tool/errors/uninstaller.rb', line 13 def multiline = [] << "Could not uninstall module '#{@module_name}' (#{v(@version)})" << " No installed version of '#{@module_name}' matches (#{v(@version)})" += @modules.map do |mod| " '#{mod[:name]}' (#{v(mod[:version])}) is installed in #{mod[:path]}" end .join("\n") end |