Class: YPTools
- Inherits:
-
Object
- Object
- YPTools
- Defined in:
- lib/yptools.rb
Class Method Summary collapse
- .autocre(name) ⇒ Object
- .autoinit ⇒ Object
- .cmd_dispatch(argvs) ⇒ Object
- .help ⇒ Object
- .install(name) ⇒ Object
- .mgc(suffix) ⇒ Object
- .package(filepath, delete = 1) ⇒ Object
- .ufct ⇒ Object
- .update ⇒ Object
- .xpj(cmd) ⇒ Object
Class Method Details
.autocre(name) ⇒ Object
123 124 125 |
# File 'lib/yptools.rb', line 123 def self.autocre(name) YPAutoCreate.createObjcSQL(name) end |
.autoinit ⇒ Object
127 128 129 |
# File 'lib/yptools.rb', line 127 def self.autoinit YPAutoInit.createObjcInitJson end |
.cmd_dispatch(argvs) ⇒ Object
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 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/yptools.rb', line 16 def self.cmd_dispatch(argvs) cmd = argvs[0] case cmd when 'autocre' if argvs.size > 1 name = argvs[1] case name when '-init' self.autoinit when '-objc' if argvs.size > 2 path = argvs[2] self.autocre path else yp_log_fail "'yptools autocre -objc..' 参数缺失" self.help end end else yp_log_fail "'yptools autocre ..' 参数缺失" self.help end 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 'install' if argvs.size > 1 name = argvs[1] self.install name else yp_log_fail "'yptools install ..' 参数缺失" self.help end when 'showipa' if argvs.size > 2 filepath = argvs[1] self.package(filepath,0) elsif argvs.size > 1 filepath = argvs[1] self.package filepath else yp_log_fail "'yptools package ..' 参数缺失" 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
93 94 95 |
# File 'lib/yptools.rb', line 93 def self.help YPHelp. end |
.install(name) ⇒ Object
107 108 109 |
# File 'lib/yptools.rb', line 107 def self.install(name) YPInstall.install(name) end |
.mgc(suffix) ⇒ Object
103 104 105 |
# File 'lib/yptools.rb', line 103 def self.mgc(suffix) yp_tools_method_makeGarbage suffix end |
.package(filepath, delete = 1) ⇒ Object
111 112 113 |
# File 'lib/yptools.rb', line 111 def self.package(filepath, delete = 1) YPPackage.analysis(filepath,delete) end |
.ufct ⇒ Object
97 98 99 100 101 |
# File 'lib/yptools.rb', line 97 def self.ufct path = `pwd` path = path.sub("\n","") yp_updatereateDate path end |
.update ⇒ Object
115 116 117 |
# File 'lib/yptools.rb', line 115 def self.update YPUpdate.update end |
.xpj(cmd) ⇒ Object
119 120 121 |
# File 'lib/yptools.rb', line 119 def self.xpj(cmd) YPXcodeproj.xcodeproj(cmd) end |