Exception: Puppet::ModuleTool::Errors::MissingPackageError Private

Inherits:
InstallError show all
Defined in:
lib/puppet/module_tool/errors/installer.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

#original

Instance Method Summary collapse

Methods inherited from ModuleToolError

#v, #vstring

Constructor Details

#initialize(options) ⇒ MissingPackageError

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 MissingPackageError.



29
30
31
32
33
34
# File 'lib/puppet/module_tool/errors/installer.rb', line 29

def initialize(options)
  @requested_package = options[:requested_package]
  @source = options[:source]

  super _("Could not install '%{requested_package}'; no releases are available from %{source}") % { requested_package: @requested_package, source: @source }
end

Instance Method Details

#multilineObject

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.



36
37
38
39
40
41
42
# File 'lib/puppet/module_tool/errors/installer.rb', line 36

def multiline
  message = []
  message << _("Could not install '%{requested_package}'") % { requested_package: @requested_package }
  message << _("  No releases are available from %{source}") % { source: @source }
  message << _("    Does '%{requested_package}' have at least one published release?") % { requested_package: @requested_package }
  message.join("\n")
end