Class: YPTools
- Inherits:
-
Object
- Object
- YPTools
- Defined in:
- lib/yptools.rb
Class Method Summary collapse
- .cmd_dispatch(argvs) ⇒ Object
- .help ⇒ Object
- .install(name) ⇒ Object
- .mgc(suffix) ⇒ Object
- .ufct ⇒ Object
- .update ⇒ Object
- .xpj(cmd) ⇒ Object
Class Method Details
.cmd_dispatch(argvs) ⇒ Object
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 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/yptools.rb', line 11 def self.cmd_dispatch(argvs) cmd = argvs[0] case cmd when 'install' if argvs.size > 1 name = argvs[1] self.install name else yp_log_fail "'yptools install ..' 参数缺失" self.help end when 'help' self.help when 'ufct' self.ufct when 'mgc' if argvs.size > 1 suffix = argvs[1] self.mgc suffix else yp_log_fail "'yptools mgc ..' 参数缺失" self.help end when 'update' self.update when 'xpj' if argvs.size > 1 cmd = argvs[1] self.xpj cmd else yp_log_fail "'yptools xpj ..' 参数缺失" self.help end else self.help end end |
.help ⇒ Object
50 51 52 |
# File 'lib/yptools.rb', line 50 def self.help YPHelp. end |
.install(name) ⇒ Object
64 65 66 |
# File 'lib/yptools.rb', line 64 def self.install(name) YPInstall.install(name) end |
.mgc(suffix) ⇒ Object
60 61 62 |
# File 'lib/yptools.rb', line 60 def self.mgc(suffix) yp_tools_method_makeGarbage suffix end |
.ufct ⇒ Object
54 55 56 57 58 |
# File 'lib/yptools.rb', line 54 def self.ufct path = `pwd` path = path.sub("\n","") yp_updatereateDate path end |
.xpj(cmd) ⇒ Object
72 73 74 |
# File 'lib/yptools.rb', line 72 def self.xpj(cmd) YPXcodeproj.xcodeproj(cmd) end |