Sha256: 41484156cfe74dcfd54bc6c9ab5718658c453517bd2c0922ad0c11bfb6e72c51

Contents?: true

Size: 570 Bytes

Versions: 5

Compression:

Stored size: 570 Bytes

Contents

module Katello
  module Pulp
    class SimplePackage
      # {"epoch", "name", "arch", "version", "vendor", "release"}
      attr_accessor :vendor, :arch, :epoch, :version, :release, :name

      def initialize(params = {})
        params.each_pair { |k, v| instance_variable_set("@#{k}", v) unless v.nil? }
      end

      def nvra
        "#{@name}-#{@version}-#{@release}.#{@arch}"
      end

      def nvrea
        if epoch == "0"
          @nvra
        else
          "#{@name}-#{@epoch}:#{@version}-#{@release}.#{@arch}"
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
katello-3.15.0.1 app/services/katello/pulp/simple_package.rb
katello-3.15.0 app/services/katello/pulp/simple_package.rb
katello-3.15.0.rc2 app/services/katello/pulp/simple_package.rb
katello-3.15.0.rc1.3 app/services/katello/pulp/simple_package.rb
katello-3.15.0.rc1.2 app/services/katello/pulp/simple_package.rb