Class: Pod::Command::Install

Inherits:
Pod::Command show all
Defined in:
lib/cocoapods-soul-component-plugin/command/soul-component-plugin.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(argv) ⇒ Install

Returns a new instance of Install.



301
302
303
304
305
# File 'lib/cocoapods-soul-component-plugin/command/soul-component-plugin.rb', line 301

def initialize(argv)
  super
  CocoapodsSoulComponentPlugin.import_dependency = argv.option('import-dependency',CocoapodsSoulComponentPlugin.import_dependency)
  CocoapodsSoulComponentPlugin.use_source = argv.flag?('source', CocoapodsSoulComponentPlugin.use_source)
end

Class Method Details

.optionsObject



294
295
296
297
298
299
# File 'lib/cocoapods-soul-component-plugin/command/soul-component-plugin.rb', line 294

def self.options
  [
    ['--source', 'Use source'],
    ['--import-dependency', 'Use importDependency']
  ].concat(super)
end

Instance Method Details

#old_runObject



307
# File 'lib/cocoapods-soul-component-plugin/command/soul-component-plugin.rb', line 307

alias old_run run

#runObject



309
310
311
312
313
314
315
# File 'lib/cocoapods-soul-component-plugin/command/soul-component-plugin.rb', line 309

def run
  # Pod::UI.puts "这是测试版本".red
  Pod::UI.puts "当前版本:#{CocoapodsSoulComponentPlugin::VERSION}".green
  CocoapodsSoulComponentPlugin.pre_run if CocoapodsSoulComponentPlugin.use_components
  old_run
  CocoapodsSoulComponentPlugin.post_run if CocoapodsSoulComponentPlugin.use_components
end

#validate!Object



317
318
319
# File 'lib/cocoapods-soul-component-plugin/command/soul-component-plugin.rb', line 317

def validate!
  super
end