Class: Pkg_noisrev::FbsdPackage::OnePackage
- Inherits:
-
Object
- Object
- Pkg_noisrev::FbsdPackage::OnePackage
- Includes:
- Comparable
- Defined in:
- lib/pkg_noisrev/fbsdpackage.rb
Overview
A placeholder for package.
Constant Summary collapse
- CATEGORY =
['Root (no dependencies, not depended on)', 'Trunk (no dependencies, are depended on)', 'Branch (have dependencies, are depended on)', 'Leaf (have dependencies, not depended on)', 'Unknown category']
Instance Attribute Summary collapse
-
#category ⇒ Object
Returns the value of attribute category.
-
#name ⇒ Object
Returns the value of attribute name.
-
#origin ⇒ Object
Returns the value of attribute origin.
-
#ports_ver ⇒ Object
Returns the value of attribute ports_ver.
-
#ver ⇒ Object
Returns the value of attribute ver.
Instance Method Summary collapse
-
#<=>(other) ⇒ Object
by name.
-
#initialize(name, ver, origin, ports_ver, category) ⇒ OnePackage
constructor
A new instance of OnePackage.
Constructor Details
#initialize(name, ver, origin, ports_ver, category) ⇒ OnePackage
Returns a new instance of OnePackage.
19 20 21 22 23 24 25 |
# File 'lib/pkg_noisrev/fbsdpackage.rb', line 19 def initialize(name, ver, origin, ports_ver, category) @name = name @ver = ver @origin = origin @ports_ver = ports_ver @category = category end |
Instance Attribute Details
#category ⇒ Object
Returns the value of attribute category.
17 18 19 |
# File 'lib/pkg_noisrev/fbsdpackage.rb', line 17 def category @category end |
#name ⇒ Object
Returns the value of attribute name.
17 18 19 |
# File 'lib/pkg_noisrev/fbsdpackage.rb', line 17 def name @name end |
#origin ⇒ Object
Returns the value of attribute origin.
17 18 19 |
# File 'lib/pkg_noisrev/fbsdpackage.rb', line 17 def origin @origin end |
#ports_ver ⇒ Object
Returns the value of attribute ports_ver.
17 18 19 |
# File 'lib/pkg_noisrev/fbsdpackage.rb', line 17 def ports_ver @ports_ver end |
#ver ⇒ Object
Returns the value of attribute ver.
17 18 19 |
# File 'lib/pkg_noisrev/fbsdpackage.rb', line 17 def ver @ver end |
Instance Method Details
#<=>(other) ⇒ Object
by name
28 29 30 |
# File 'lib/pkg_noisrev/fbsdpackage.rb', line 28 def <=>(other) @name <=> other.name end |