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.



252
253
254
255
256
257
258
# File 'lib/cocoapods-soul-component-plugin/command/soul-component-plugin.rb', line 252

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

Class Method Details

.optionsObject



244
245
246
247
248
249
# File 'lib/cocoapods-soul-component-plugin/command/soul-component-plugin.rb', line 244

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

Instance Method Details

#old_runObject



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

alias old_run run

#runObject



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

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