Class: Pkg_noisrev::FbsdPackage::OnePackage

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#categoryObject

Returns the value of attribute category.



17
18
19
# File 'lib/pkg_noisrev/fbsdpackage.rb', line 17

def category
  @category
end

#nameObject

Returns the value of attribute name.



17
18
19
# File 'lib/pkg_noisrev/fbsdpackage.rb', line 17

def name
  @name
end

#originObject

Returns the value of attribute origin.



17
18
19
# File 'lib/pkg_noisrev/fbsdpackage.rb', line 17

def origin
  @origin
end

#ports_verObject

Returns the value of attribute ports_ver.



17
18
19
# File 'lib/pkg_noisrev/fbsdpackage.rb', line 17

def ports_ver
  @ports_ver
end

#verObject

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