Class: Autoproj::OSPackageQuery::Adapter
- Inherits:
-
Object
- Object
- Autoproj::OSPackageQuery::Adapter
- Defined in:
- lib/autoproj/os_package_query.rb
Instance Method Summary collapse
-
#initialize(pkg, os_package_resolver) ⇒ Adapter
constructor
A new instance of Adapter.
- #name ⇒ Object
- #package_manager ⇒ Object
- #real_package ⇒ Object
Constructor Details
#initialize(pkg, os_package_resolver) ⇒ Adapter
Returns a new instance of Adapter.
35 36 37 38 |
# File 'lib/autoproj/os_package_query.rb', line 35 def initialize(pkg, os_package_resolver) @pkg = pkg @os_package_resolver = os_package_resolver end |
Instance Method Details
#name ⇒ Object
40 41 42 |
# File 'lib/autoproj/os_package_query.rb', line 40 def name [@pkg] end |
#package_manager ⇒ Object
51 52 53 54 55 56 |
# File 'lib/autoproj/os_package_query.rb', line 51 def package_manager packages = @os_package_resolver.resolve_os_packages([@pkg]) packages.flat_map do |handler, handler_packages| handler end.uniq end |
#real_package ⇒ Object
44 45 46 47 48 49 |
# File 'lib/autoproj/os_package_query.rb', line 44 def real_package packages = @os_package_resolver.resolve_os_packages([@pkg]) packages.flat_map do |handler, handler_packages| handler_packages end.uniq end |