# class Chef::Provider::Package::Yum::RPMVersion

### Attributes

e[R]
epoch[R]
r[R]
release[R]
v[R]
version[R]

### Public Class Methods

new(*args) click to toggle source

    # File lib/chef/provider/package/yum.rb, line 233
    def initialize(*args)
      if args.size == 1
        @e, @v, @r = RPMUtils.version_parse(args[0])
      elsif args.size == 3
        @e = args[0].to_i
        @v = args[1]
        @r = args[2]
      else
        raise ArgumentError, "Expecting either 'epoch-version-release' or 'epoch, " +
                             "version, release'"
      end
    end

parse(*args) click to toggle source

    # File lib/chef/provider/package/yum.rb, line 250
    def self.parse(*args)
      self.new(*args)
    end

### Public Instance Methods

<=>(y) click to toggle source

    # File lib/chef/provider/package/yum.rb, line 254
    def <=>(y)
      compare_versions(y)
    end

compare(y) click to toggle source

    # File lib/chef/provider/package/yum.rb, line 258
    def compare(y)
      compare_versions(y, false)
    end

evr() click to toggle source

    # File lib/chef/provider/package/yum.rb, line 275
    def evr
      "#{@e}:#{@v}-#{@r}"
    end

partial_compare(y) click to toggle source

    # File lib/chef/provider/package/yum.rb, line 262
    def partial_compare(y)
      compare_versions(y, true)
    end

to_s() click to toggle source

RPM::Version rpm_version_to_s equivalent

    # File lib/chef/provider/package/yum.rb, line 267
    def to_s
      if @r.nil?
        @v
      else
        "#{@v}-#{@r}"
      end
    end