# class Puppet::ModuleTool::Errors::NoVersionMatchesError

### Public Class Methods

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

    # File lib/puppet/module_tool/errors/uninstaller.rb, line 6
    def initialize(options)
      @module_name = options[:module_name]
      @modules     = options[:installed_modules]
      @version     = options[:version_range]
      super "Could not uninstall '#{@module_name}'; no installed version matches"
    end

### Public Instance Methods

multiline() click to toggle source

    # File lib/puppet/module_tool/errors/uninstaller.rb, line 13
    def multiline
      message = []
      message << "Could not uninstall module '#{@module_name}' (#{v(@version)})"
      message << "  No installed version of '#{@module_name}' matches (#{v(@version)})"
      message += @modules.map do |mod|
        "    '#{mod[:name]}' (#{v(mod[:version])}) is installed in #{mod[:path]}"
      end
      message.join("\n")
    end