Exception: Puppet::ModuleTool::Errors::MultipleInstalledError Private
- Inherits:
-
ModuleToolError
- Object
- RuntimeError
- Error
- ModuleToolError
- Puppet::ModuleTool::Errors::MultipleInstalledError
- Defined in:
- lib/puppet/module_tool/errors/shared.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) ⇒ MultipleInstalledError
constructor
private
A new instance of MultipleInstalledError.
- #multiline ⇒ Object private
Methods inherited from ModuleToolError
Constructor Details
#initialize(options) ⇒ MultipleInstalledError
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 MultipleInstalledError.
171 172 173 174 175 176 177 |
# File 'lib/puppet/module_tool/errors/shared.rb', line 171 def initialize() @module_name = [:module_name] @modules = [:installed_modules] @action = [:action] # TRANSLATORS "module path" refers to a set of directories where modules may be installed super _("Could not %{action} '%{module_name}'; module appears in multiple places in the module path") % { action: @action, 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.
179 180 181 182 183 184 185 186 187 188 189 190 |
# File 'lib/puppet/module_tool/errors/shared.rb', line 179 def multiline = [] << _("Could not %{action} module '%{module_name}'") % { action: @action, module_name: @module_name } << _(" Module '%{module_name}' appears multiple places in the module path") % { module_name: @module_name } += @modules.map do |mod| # TRANSLATORS This is repeats as separate lines as a list under "Module '%{module_name}' appears multiple places in the module path" _(" '%{module_name}' (%{version}) was found in %{path}") % { module_name: @module_name, version: v(mod.version), path: mod.modulepath } end # TRANSLATORS `--modulepath` is command line option and should not be translated << _(" Use the `--modulepath` option to limit the search to specific directories") .join("\n") end |