Exception: Puppet::ModuleTool::Errors::InvalidModuleNameError Private
- Inherits:
-
ModuleToolError
- Object
- RuntimeError
- Error
- ModuleToolError
- Puppet::ModuleTool::Errors::InvalidModuleNameError
- 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) ⇒ InvalidModuleNameError
constructor
private
A new instance of InvalidModuleNameError.
- #multiline ⇒ Object private
Methods inherited from ModuleToolError
Constructor Details
#initialize(options) ⇒ InvalidModuleNameError
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 InvalidModuleNameError.
132 133 134 135 136 137 |
# File 'lib/puppet/module_tool/errors/shared.rb', line 132 def initialize() @module_name = [:module_name] @suggestion = [:suggestion] @action = [:action] super _("Could not %{action} '%{module_name}', did you mean '%{suggestion}'?") % { action: @action, module_name: @module_name, suggestion: @suggestion } 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.
139 140 141 142 143 144 145 |
# File 'lib/puppet/module_tool/errors/shared.rb', line 139 def multiline = [] << _("Could not %{action} module '%{module_name}'") % { action: @action, module_name: @module_name } << _(" The name '%{module_name}' is invalid") % { module_name: @module_name } << _(" Did you mean `puppet module %{action} %{suggestion}`?") % { action: @action, suggestion: @suggestion } .join("\n") end |