Class: YPTools
- Inherits:
-
Object
- Object
- YPTools
- Defined in:
- lib/yptools.rb
Class Method Summary collapse
- .autocre(name) ⇒ Object
- .autoinit ⇒ Object
- .chatai(message) ⇒ 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
137 138 139 |
# File 'lib/yptools.rb', line 137 def self.autocre(name) YPAutoCreate.createObjcSQL(name) end |
.autoinit ⇒ Object
141 142 143 |
# File 'lib/yptools.rb', line 141 def self.autoinit YPAutoInit.createObjcInitJson end |
.chatai(message) ⇒ Object
107 108 109 |
# File 'lib/yptools.rb', line 107 def self.chatai() YPChatAI.() end |
.cmd_dispatch(argvs) ⇒ Object
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 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/yptools.rb', line 17 def self.cmd_dispatch(argvs) cmd = argvs[0] case cmd when 'chatai' if argvs.size > 1 name = argvs[1] self.chatai name else yp_log_fail "'yptools chatai ..' 参数缺失" self.help end 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
103 104 105 |
# File 'lib/yptools.rb', line 103 def self.help YPHelp. end |
.install(name) ⇒ Object
121 122 123 |
# File 'lib/yptools.rb', line 121 def self.install(name) YPInstall.install(name) end |
.mgc(suffix) ⇒ Object
117 118 119 |
# File 'lib/yptools.rb', line 117 def self.mgc(suffix) yp_tools_method_makeGarbage suffix end |
.package(filepath, delete = 1) ⇒ Object
125 126 127 |
# File 'lib/yptools.rb', line 125 def self.package(filepath, delete = 1) YPPackage.analysis(filepath,delete) end |
.ufct ⇒ Object
111 112 113 114 115 |
# File 'lib/yptools.rb', line 111 def self.ufct path = `pwd` path = path.sub("\n","") yp_updatereateDate path end |
.xpj(cmd) ⇒ Object
133 134 135 |
# File 'lib/yptools.rb', line 133 def self.xpj(cmd) YPXcodeproj.xcodeproj(cmd) end |