Class: Debian::AptPkg::Package
- Inherits:
-
Object
- Object
- Debian::AptPkg::Package
- Defined in:
- lib/debian/apt_pkg/package.rb
Overview
Debian::AptPkg::Package class Representation of a package in a cache
Instance Attribute Summary collapse
-
#arch ⇒ Object
Returns the value of attribute arch.
-
#current_version ⇒ Object
Returns the value of attribute current_version.
-
#essential ⇒ Object
Returns the value of attribute essential.
-
#full_name ⇒ Object
Returns the value of attribute full_name.
-
#id ⇒ Object
Returns the value of attribute id.
-
#important ⇒ Object
Returns the value of attribute important.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(id, name, full_name, arch, essential, important, current_version) ⇒ Package
constructor
Initialize the Package class.
-
#is_installed ⇒ Boolean
Return ‘true` if the package is installed.
Constructor Details
#initialize(id, name, full_name, arch, essential, important, current_version) ⇒ Package
Initialize the Package class
28 29 30 31 32 33 34 35 36 |
# File 'lib/debian/apt_pkg/package.rb', line 28 def initialize(id, name, full_name, arch, essential, important, current_version) @id = id @name = name @full_name = full_name @arch = arch @essential = essential @important = important @current_version = current_version end |
Instance Attribute Details
#arch ⇒ Object
Returns the value of attribute arch.
9 10 11 |
# File 'lib/debian/apt_pkg/package.rb', line 9 def arch @arch end |
#current_version ⇒ Object
Returns the value of attribute current_version.
9 10 11 |
# File 'lib/debian/apt_pkg/package.rb', line 9 def current_version @current_version end |
#essential ⇒ Object
Returns the value of attribute essential.
9 10 11 |
# File 'lib/debian/apt_pkg/package.rb', line 9 def essential @essential end |
#full_name ⇒ Object
Returns the value of attribute full_name.
9 10 11 |
# File 'lib/debian/apt_pkg/package.rb', line 9 def full_name @full_name end |
#id ⇒ Object
Returns the value of attribute id.
9 10 11 |
# File 'lib/debian/apt_pkg/package.rb', line 9 def id @id end |
#important ⇒ Object
Returns the value of attribute important.
9 10 11 |
# File 'lib/debian/apt_pkg/package.rb', line 9 def important @important end |
#name ⇒ Object
Returns the value of attribute name.
9 10 11 |
# File 'lib/debian/apt_pkg/package.rb', line 9 def name @name end |
Instance Method Details
#is_installed ⇒ Boolean
Return ‘true` if the package is installed
40 41 42 43 44 |
# File 'lib/debian/apt_pkg/package.rb', line 40 def is_installed return false unless current_version true end |