Class: YPTools

Inherits:
Object
  • Object
show all
Defined in:
lib/yptools.rb

Class Method Summary collapse

Class Method Details

.cmd_dispatch(argvs) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/yptools.rb', line 8

def self.cmd_dispatch(argvs)
    cmd = argvs[0]
    case cmd
    when 'help'
        self.help
    when 'mgc'
        if argvs.size > 1
            suffix = argvs[1]
            self.mgc suffix
        else
            yp_log_fail "'yptools mgc ..' 参数缺失"
            self.help
        end
    when 'install'
        if argvs.size > 1
            name = argvs[1]
            self.install name
        else
            yp_log_fail "'yptools install ..' 参数缺失"
            self.help
        end
    else
        self.help
    end
    
end

.helpObject



35
36
37
# File 'lib/yptools.rb', line 35

def self.help
    YPHelp.message
end

.install(name) ⇒ Object



43
44
45
# File 'lib/yptools.rb', line 43

def self.install(name)
    YPInstall.install(name)
end

.mgc(suffix) ⇒ Object



39
40
41
# File 'lib/yptools.rb', line 39

def self.mgc(suffix)
    yp_tools_method_makeGarbage suffix
end