Class: Winget
- Inherits:
-
Thor
- Object
- Thor
- Winget
- Defined in:
- lib/pkg/pkgm/winget.rb
Instance Method Summary collapse
Instance Method Details
#install(package, *args) ⇒ Object
14 15 16 17 18 |
# File 'lib/pkg/pkgm/winget.rb', line 14 def install(package, *args) success = system 'winget', 'install', *args, "--id=#{package}", '-e' PkgConfig.add(self.class.name, ConfigOptions::PACKAGES, package, success) end |
#uninstall(package, *args) ⇒ Object
26 27 28 29 30 |
# File 'lib/pkg/pkgm/winget.rb', line 26 def uninstall(package, *args) success = system 'winget', 'uninstall', *args, "--id=#{package}", '-e' PkgConfig.remove(self.class.name, ConfigOptions::PACKAGES, package, success) end |
#update(*_args) ⇒ Object
21 22 23 |
# File 'lib/pkg/pkgm/winget.rb', line 21 def update(*_args) system 'winget', 'upgrade' end |