Class: Autoproj::OSPackageQuery::Adapter

Inherits:
Object
  • Object
show all
Defined in:
lib/autoproj/os_package_query.rb

Instance Method Summary collapse

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

#nameObject



40
41
42
# File 'lib/autoproj/os_package_query.rb', line 40

def name
    [@pkg]
end

#package_managerObject



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_packageObject



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