Exception: Puppet::ModuleTool::Errors::NotInstalledError
- Inherits:
-
ModuleToolError
- Object
- StandardError
- ModuleToolError
- Puppet::ModuleTool::Errors::NotInstalledError
- Defined in:
- lib/vendor/puppet/module_tool/errors/shared.rb
Instance Method Summary collapse
-
#initialize(options) ⇒ NotInstalledError
constructor
A new instance of NotInstalledError.
- #multiline ⇒ Object
Methods inherited from ModuleToolError
Constructor Details
#initialize(options) ⇒ NotInstalledError
Returns a new instance of NotInstalledError.
59 60 61 62 63 64 |
# File 'lib/vendor/puppet/module_tool/errors/shared.rb', line 59 def initialize() @module_name = [:module_name] @suggestions = [:suggestions] || [] @action = [:action] super "Could not #{@action} '#{@module_name}'; module is not installed" end |
Instance Method Details
#multiline ⇒ Object
66 67 68 69 70 71 72 73 74 75 |
# File 'lib/vendor/puppet/module_tool/errors/shared.rb', line 66 def multiline = [] << "Could not #{@action} module '#{@module_name}'" << " Module '#{@module_name}' is not installed" += @suggestions.map do |suggestion| " You may have meant `puppet module #{@action} #{suggestion}`" end << " Use `puppet module install` to install this module" if @action == :upgrade .join("\n") end |