Class: Plat4m::Sniffer::Linux::Pacman
- Inherits:
-
NixManager
- Object
- PkgManager
- NixManager
- Plat4m::Sniffer::Linux::Pacman
- Defined in:
- lib/plat4m/sniff/linux.rb
Instance Method Summary collapse
Methods inherited from NixManager
#initialize, #make_install_command, #make_uninstall_command
Methods inherited from PkgManager
#has_sudo?, #initialize, #install, #is_root?, #make_install_command, #make_uninstall_command, #select_available, #select_uninstalled, #uninstall
Constructor Details
This class inherits a constructor from Plat4m::Sniffer::Linux::NixManager
Instance Method Details
#available?(pkg) ⇒ Boolean
241 242 243 |
# File 'lib/plat4m/sniff/linux.rb', line 241 def available?(pkg) system(%Q[pacman -Ss "^#{pkg}$" >/dev/null 2>&1]) end |
#installed?(pkg) ⇒ Boolean
237 238 239 |
# File 'lib/plat4m/sniff/linux.rb', line 237 def installed?(pkg) system("pacman -Qq #{pkg} >/dev/null 2>&1") end |