# class Puppet::ModuleTool::Errors::NotInstalledError

### Public Class Methods

new(options) click to toggle source
Calls superclass method Puppet::Error.new

    # File lib/puppet/module_tool/errors/shared.rb, line 59
    def initialize(options)
      @module_name = options[:module_name]
      @suggestions = options[:suggestions] || []
      @action      = options[:action]
      super "Could not #{@action} '#{@module_name}'; module is not installed"
    end

### Public Instance Methods

multiline() click to toggle source

    # File lib/puppet/module_tool/errors/shared.rb, line 66
    def multiline
      message = []
      message << "Could not #{@action} module '#{@module_name}'"
      message << "  Module '#{@module_name}' is not installed"
      message += @suggestions.map do |suggestion|
        "    You may have meant `puppet module #{@action} #{suggestion}`"
      end
      message << "    Use `puppet module install` to install this module" if @action == :upgrade
      message.join("\n")
    end