Exception: Puppet::ModuleTool::Errors::ModuleToolError Private

Inherits:
Error
  • Object
show all
Defined in:
lib/puppet/module_tool/errors/base.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 Error

#initialize

Constructor Details

This class inherits a constructor from Puppet::Error

Instance Method Details

#v(version) ⇒ 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.


3
4
5
# File 'lib/puppet/module_tool/errors/base.rb', line 3

def v(version)
  (version || '???').to_s.sub(/^(?=\d)/, 'v')
end

#vstringObject

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.


7
8
9
10
11
12
13
# File 'lib/puppet/module_tool/errors/base.rb', line 7

def vstring
  if @action == :upgrade
    "#{v(@installed_version)} -> #{v(@requested_version)}"
  else
    "#{v(@installed_version || @requested_version)}"
  end
end