class Escalator::Command::Archive
Attributes
method[R]
output_path[R]
project_path[R]
show_output[R]
show_output?[R]
Public Class Methods
new(argv)
click to toggle source
Calls superclass method
# File lib/escalator/command/archive.rb, line 49 def initialize argv @method = argv.arguments!.first @project_path = argv.option "project-path", "" @output_path = argv.option "output-path", "" @show_output = argv.flag? "show-output", false super end
options()
click to toggle source
Calls superclass method
Escalator::Command::options
# File lib/escalator/command/archive.rb, line 41 def self.options [ ["--project-path=path", "path 为 .xcproject 源路径"], ["--output-path=path", "path 为 .ipa 以及部分重签资源的存放路径"], ["--show-output", "文件管理中展示输出文件夹, 默认: 否"] ].concat super end
Public Instance Methods
help!(error_message = nil)
click to toggle source
# File lib/escalator/command/archive.rb, line 72 def help!(error_message = nil) invoked_command_class.help!(error_message, Help) end
run()
click to toggle source
# File lib/escalator/command/archive.rb, line 76 def run Escalator::Archive.run self end
validate!()
click to toggle source
Calls superclass method
# File lib/escalator/command/archive.rb, line 57 def validate! super if !method help! "未检测到 METHOD 参数" elsif !%w(app-store ad-hoc).include? method help! "METHOD 参数只能为 #{"app-store".ansi.green}, #{"ad-hoc".ansi.green}" end if project_path.empty? help! "未检测到 --project-path 参数" end if output_path.empty? help! "未检测到 --output-path 参数" end end