Exception: Puppet::ModuleTool::Errors::NoVersionMatchesError Private
- Inherits:
-
UninstallError
- Object
- RuntimeError
- Error
- ModuleToolError
- UninstallError
- Puppet::ModuleTool::Errors::NoVersionMatchesError
- Defined in:
- lib/puppet/module_tool/errors/uninstaller.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(options) ⇒ NoVersionMatchesError
constructor
private
A new instance of NoVersionMatchesError.
- #multiline ⇒ Object private
Methods inherited from ModuleToolError
Constructor Details
#initialize(options) ⇒ NoVersionMatchesError
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of NoVersionMatchesError.
7 8 9 10 11 12 |
# File 'lib/puppet/module_tool/errors/uninstaller.rb', line 7 def initialize() @module_name = [:module_name] @modules = [:installed_modules] @version = [:version_range] super _("Could not uninstall '%{module_name}'; no installed version matches") % { module_name: @module_name } end |
Instance Method Details
#multiline ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
14 15 16 17 18 19 20 21 22 |
# File 'lib/puppet/module_tool/errors/uninstaller.rb', line 14 def multiline = [] << _("Could not uninstall module '%{module_name}' (%{version})") % { module_name: @module_name, version: v(@version) } << _(" No installed version of '%{module_name}' matches (%{version})") % { module_name: @module_name, version: v(@version) } += @modules.map do |mod| _(" '%{module_name}' (%{version}) is installed in %{path}") % { module_name: mod[:name], version: v(mod[:version]), path: mod[:path] } end .join("\n") end |