class Escalator::Command::Confuse
Attributes
keywords[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/confuse.rb, line 53 def initialize argv @keywords = argv.arguments!.select { |arg| !arg.empty? } @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/confuse.rb, line 45 def self.options [ ["--project-path=path", "path 为 .xcodeproj 源路径"], ["--output-path=path", "path 为混淆工程存放路径"], ["--show-output", "文件管理中展示输出文件夹, 默认: 否"] ].concat super end
Public Instance Methods
help!(error_message = nil)
click to toggle source
# File lib/escalator/command/confuse.rb, line 74 def help!(error_message = nil) invoked_command_class.help!(error_message, Help) end
run()
click to toggle source
# File lib/escalator/command/confuse.rb, line 78 def run Escalator::Confuse.run self end
validate!()
click to toggle source
Calls superclass method
# File lib/escalator/command/confuse.rb, line 61 def validate! super if keywords.empty? help! "未检测到 KEYWORD 参数" end if project_path.empty? help! "未检测到 --project-path 参数" end if output_path.empty? help! "未检测到 --output-path 参数" end end