Class: EasyAI::EasyAIApp
- Inherits:
-
Object
- Object
- EasyAI::EasyAIApp
- Defined in:
- lib/easyai.rb
Overview
EasyAI 应用程序主类
Instance Method Summary collapse
Instance Method Details
#run(argv) ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/easyai.rb', line 21 def run(argv) # 解析参数以确定是否显示启动标志 require 'claide' require 'colored2' coerced_argv = CLAide::ARGV.coerce(argv) # 如果不是帮助或版本查询,显示启动标志 unless coerced_argv.flag?('help') || coerced_argv.flag?('version') end # 在运行命令前进行版本检查 check_version_before_run(argv) # 运行命令 EasyAI::Command.run(argv) end |