Class: Jah::Yum
- Inherits:
-
ActPkg::Base
- Object
- ActPkg::Base
- Jah::Yum
- Defined in:
- lib/jah/act_pkg/yum.rb
Instance Method Summary collapse
- #all(filter = nil) ⇒ Object
-
#info(pkg) ⇒ Object
all pkgs…search repo.
- #install(what) ⇒ Object
- #uninstall ⇒ Object
- #update ⇒ Object
Methods inherited from ActPkg::Base
Instance Method Details
#all(filter = nil) ⇒ Object
6 7 8 9 10 11 |
# File 'lib/jah/act_pkg/yum.rb', line 6 def all(filter = nil) run("yum -q list installed").to_a[1..-1].map do |l| name, version = l.split(" ")[0..1] Pkg.new(:installed, name.split(".i")[0], version ) end end |
#info(pkg) ⇒ Object
all pkgs…search repo
14 15 16 |
# File 'lib/jah/act_pkg/yum.rb', line 14 def info(pkg) end |
#install(what) ⇒ Object
18 19 20 |
# File 'lib/jah/act_pkg/yum.rb', line 18 def install(what) "yum install #{what}" end |
#uninstall ⇒ Object
22 23 24 |
# File 'lib/jah/act_pkg/yum.rb', line 22 def uninstall "remove" end |
#update ⇒ Object
26 27 28 |
# File 'lib/jah/act_pkg/yum.rb', line 26 def update "check-update" end |