Class: Jah::Yum

Inherits:
ActPkg::Base show all
Defined in:
lib/jah/act_pkg/yum.rb

Instance Method Summary collapse

Methods inherited from ActPkg::Base

#run

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

#uninstallObject



22
23
24
# File 'lib/jah/act_pkg/yum.rb', line 22

def uninstall
  "remove"
end

#updateObject



26
27
28
# File 'lib/jah/act_pkg/yum.rb', line 26

def update
  "check-update"
end