Sha256: 87d7996cfc01fabb0e451d7ffd742c2a0b3e6d8efea3fcbe921fdfb5795421a7

Contents?: true

Size: 386 Bytes

Versions: 20

Compression:

Stored size: 386 Bytes

Contents

# frozen_string_literal: true
module Puppet::ModuleTool::Errors
  class ModuleToolError < Puppet::Error
    def v(version)
      (version || '???').to_s.sub(/^(?=\d)/, 'v')
    end

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

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
puppet-8.3.0 lib/puppet/module_tool/errors/base.rb
puppet-8.3.0-x86-mingw32 lib/puppet/module_tool/errors/base.rb
puppet-8.3.0-x64-mingw32 lib/puppet/module_tool/errors/base.rb
puppet-8.3.0-universal-darwin lib/puppet/module_tool/errors/base.rb
puppet-8.3.1 lib/puppet/module_tool/errors/base.rb
puppet-8.3.1-x86-mingw32 lib/puppet/module_tool/errors/base.rb
puppet-8.3.1-x64-mingw32 lib/puppet/module_tool/errors/base.rb
puppet-8.3.1-universal-darwin lib/puppet/module_tool/errors/base.rb
puppet-8.2.0 lib/puppet/module_tool/errors/base.rb
puppet-8.2.0-x86-mingw32 lib/puppet/module_tool/errors/base.rb
puppet-8.2.0-x64-mingw32 lib/puppet/module_tool/errors/base.rb
puppet-8.2.0-universal-darwin lib/puppet/module_tool/errors/base.rb
puppet-8.1.0 lib/puppet/module_tool/errors/base.rb
puppet-8.1.0-x86-mingw32 lib/puppet/module_tool/errors/base.rb
puppet-8.1.0-x64-mingw32 lib/puppet/module_tool/errors/base.rb
puppet-8.1.0-universal-darwin lib/puppet/module_tool/errors/base.rb
puppet-8.0.1 lib/puppet/module_tool/errors/base.rb
puppet-8.0.1-x86-mingw32 lib/puppet/module_tool/errors/base.rb
puppet-8.0.1-x64-mingw32 lib/puppet/module_tool/errors/base.rb
puppet-8.0.1-universal-darwin lib/puppet/module_tool/errors/base.rb