Class: Pod::Command::Kz::Repair
- Inherits:
-
Pod::Command::Kz
- Object
- Pod::Command
- Pod::Command::Kz
- Pod::Command::Kz::Repair
- Defined in:
- lib/cocoapods-kz/command/repair.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(argv) ⇒ Repair
constructor
A new instance of Repair.
- #run ⇒ Object
Methods inherited from Pod::Command::Kz
Constructor Details
#initialize(argv) ⇒ Repair
Returns a new instance of Repair.
21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/cocoapods-kz/command/repair.rb', line 21 def initialize(argv) @repair_module_import = argv.flag?('module-import') @repair_dynamic_swift = argv.flag?('dynamic-swift') unless @repair_module_import || @repair_dynamic_swift if Pod.match_version?('~> 1.11') KZ::KZGlobalHelper.instance.analyze_special_parameters(true, false, argv.arguments!) KZ::KZGlobalHelper.instance.generate_kz_pod_targets = true end super end |
Class Method Details
.options ⇒ Object
14 15 16 17 18 19 |
# File 'lib/cocoapods-kz/command/repair.rb', line 14 def self. [ ['--module-import', "指定组件名(只针对开发组件),修复该组件所有文件头文件导入方式,壳工程使用“Main”,如果不指定,默认对所有开发组件进行修复"], ['--dynamic-swift', "指定组件名(只针对开发组件),将该组件中所有swift文件添加OC特性,壳工程使用“Main”,如果不指定,默认对所有开发组件进行修复"], ] end |
Instance Method Details
#run ⇒ Object
34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/cocoapods-kz/command/repair.rb', line 34 def run installer = installer_for_config installer.prepare installer.resolve_dependencies installer.download_dependencies if @repair_dynamic_swift KZ::KZSwiftAttachOCFeature.new.repair elsif @repair_module_import KZ::KZRepairModuleImport.new(installer.aggregate_targets.first.user_project).repair end end |