Class: Debci::Package

Inherits:
Struct
  • Object
show all
Defined in:
lib/debci/package.rb

Overview

This class represents a single package. See Debci::Repository for how to obtain one of these.

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Instance Attribute Details

- (Object) name

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



6
7
8
# File 'lib/debci/package.rb', line 6

def name
  @name
end

- (Object) repository

Returns the value of attribute repository

Returns:

  • (Object)

    the current value of repository



6
7
8
# File 'lib/debci/package.rb', line 6

def repository
  @repository
end

Instance Method Details

- (Object) architectures

Returns the architectures in which this package is available



9
10
11
# File 'lib/debci/package.rb', line 9

def architectures
  repository.architectures_for(self)
end

- (Object) news

Returns a list of Debci::Status objects that are newsworthy for this package. The list is sorted with the most recent entries first and the older entries last.



34
35
36
# File 'lib/debci/package.rb', line 34

def news
  repository.news_for(self)
end

- (Object) status

Returns a matrix of Debci::Status objects, where rows represent architectures and columns represent suites:

[
  [ amd64_unstable , amd64_testing ],
  [ i386_unstable, i386_testing ],
]

Each cell of the matrix contains a Debci::Status object.



27
28
29
# File 'lib/debci/package.rb', line 27

def status
  repository.status_for(self)
end

- (Object) suites

Returns the suites in which this package is available



14
15
16
# File 'lib/debci/package.rb', line 14

def suites
  repository.suites_for(self)
end

- (Object) to_s



38
39
40
41
# File 'lib/debci/package.rb', line 38

def to_s
  # :nodoc:
  "<Package #{name}>"
end

- (Object) to_str



43
44
45
46
# File 'lib/debci/package.rb', line 43

def to_str
  # :nodoc:
  name
end