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.



263
264
265
266
267
# File 'lib/cocoapods-soul-component-plugin/command/soul-component-plugin.rb', line 263

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



256
257
258
259
260
261
# File 'lib/cocoapods-soul-component-plugin/command/soul-component-plugin.rb', line 256

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

Instance Method Details

#old_runObject



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

alias old_run run

#runObject



271
272
273
274
275
276
# File 'lib/cocoapods-soul-component-plugin/command/soul-component-plugin.rb', line 271

def run
  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



278
279
280
# File 'lib/cocoapods-soul-component-plugin/command/soul-component-plugin.rb', line 278

def validate!
  super
end