Class: DebsFromRepos::Packages
- Inherits:
-
Object
- Object
- DebsFromRepos::Packages
- Defined in:
- lib/debsfromrepos/packages.rb
Instance Attribute Summary collapse
-
#packages ⇒ Object
readonly
Returns the value of attribute packages.
Instance Method Summary collapse
-
#initialize(packages_url, translations_url = nil) ⇒ Packages
constructor
A new instance of Packages.
Constructor Details
#initialize(packages_url, translations_url = nil) ⇒ Packages
Returns a new instance of Packages.
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/debsfromrepos/packages.rb', line 9 def initialize(packages_url, translations_url=nil) get_packages(packages_url) if translations_url lang_match = translations_url.match(/Translation-([a-z][a-z]).gz/) if lang_match lang = "-#{lang_match[1]}" get_packages(translations_url, lang) end end end |
Instance Attribute Details
#packages ⇒ Object (readonly)
Returns the value of attribute packages.
7 8 9 |
# File 'lib/debsfromrepos/packages.rb', line 7 def packages @packages end |