Class: LoomExt::CoreMods::Package::AptAdapter
Instance Attribute Summary
Attributes inherited from PkgAdapter
#loom
Instance Method Summary
collapse
Methods inherited from DpkgAdapter
#installed?
Methods inherited from PkgAdapter
#ensure_installed, #initialize, #installed?
Instance Method Details
#install(pkg_name) ⇒ Object
56
57
58
59
|
# File 'lib/loomext/coremods/package/adapter.rb', line 56
def install(pkg_name)
loom.x "apt-get", "-y", "install", pkg_name
end
|
#uninstall(pkg_name) ⇒ Object
61
62
63
|
# File 'lib/loomext/coremods/package/adapter.rb', line 61
def uninstall(pkg_name)
loom << "echo apt uninstall"
end
|
#update_cache ⇒ Object
65
66
67
68
|
# File 'lib/loomext/coremods/package/adapter.rb', line 65
def update_cache
loom.x "apt", "-y", "update"
end
|
#upgrade(pkg_name = nil) ⇒ Object
70
71
72
73
74
|
# File 'lib/loomext/coremods/package/adapter.rb', line 70
def upgrade(pkg_name = nil)
args = ["apt-get", "-y", "upgrade", pkg_name].compact
loom.x(*args)
end
|