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

Inherits:
StandardError
  • Object
show all
Defined in:
lib/vendor/puppet/module_tool/errors/base.rb

Instance Method Summary collapse

Instance Method Details

#v(version) ⇒ Object



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

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

#vstringObject



7
8
9
10
11
12
13
# File 'lib/vendor/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