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
34
35
# File 'lib/yptools.rb', line 8

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

.helpObject



37
38
39
# File 'lib/yptools.rb', line 37

def self.help
    YPHelp.message
end

.install(name) ⇒ Object



45
46
47
# File 'lib/yptools.rb', line 45

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

.mgc(suffix) ⇒ Object



41
42
43
# File 'lib/yptools.rb', line 41

def self.mgc(suffix)
    yp_tools_method_makeGarbage suffix
end