Class: Katello::SimplePackage
- Inherits:
-
Object
- Object
- Katello::SimplePackage
- Defined in:
- app/services/katello/simple_package.rb
Instance Attribute Summary collapse
-
#arch ⇒ Object
Returns the value of attribute arch.
-
#epoch ⇒ Object
Returns the value of attribute epoch.
-
#name ⇒ Object
Returns the value of attribute name.
-
#persistence ⇒ Object
Returns the value of attribute persistence.
-
#release ⇒ Object
Returns the value of attribute release.
-
#vendor ⇒ Object
Returns the value of attribute vendor.
-
#version ⇒ Object
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ SimplePackage
constructor
A new instance of SimplePackage.
- #nvra ⇒ Object
- #nvrea ⇒ Object
Constructor Details
#initialize(params = {}) ⇒ SimplePackage
Returns a new instance of SimplePackage.
5 6 7 |
# File 'app/services/katello/simple_package.rb', line 5 def initialize(params = {}) params.each_pair { |k, v| instance_variable_set("@#{k}", v) unless v.nil? } end |
Instance Attribute Details
#arch ⇒ Object
Returns the value of attribute arch.
3 4 5 |
# File 'app/services/katello/simple_package.rb', line 3 def arch @arch end |
#epoch ⇒ Object
Returns the value of attribute epoch.
3 4 5 |
# File 'app/services/katello/simple_package.rb', line 3 def epoch @epoch end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'app/services/katello/simple_package.rb', line 3 def name @name end |
#persistence ⇒ Object
Returns the value of attribute persistence.
3 4 5 |
# File 'app/services/katello/simple_package.rb', line 3 def persistence @persistence end |
#release ⇒ Object
Returns the value of attribute release.
3 4 5 |
# File 'app/services/katello/simple_package.rb', line 3 def release @release end |
#vendor ⇒ Object
Returns the value of attribute vendor.
3 4 5 |
# File 'app/services/katello/simple_package.rb', line 3 def vendor @vendor end |
#version ⇒ Object
Returns the value of attribute version.
3 4 5 |
# File 'app/services/katello/simple_package.rb', line 3 def version @version end |
Instance Method Details
#nvra ⇒ Object
9 10 11 |
# File 'app/services/katello/simple_package.rb', line 9 def nvra "#{@name}-#{@version}-#{@release}.#{@arch}" end |
#nvrea ⇒ Object
13 14 15 16 17 18 19 |
# File 'app/services/katello/simple_package.rb', line 13 def nvrea if epoch.nil? || epoch.to_s == "0" nvra else "#{@name}-#{@epoch}:#{@version}-#{@release}.#{@arch}" end end |