Class: Pod::Command::Install_tal

Inherits:
Installer show all
Defined in:
lib/cocoapods-install_tal/command/install_tal.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(argv) ⇒ Install_tal

Returns a new instance of Install_tal.



16
17
18
19
# File 'lib/cocoapods-install_tal/command/install_tal.rb', line 16

def initialize(argv)
  @no_fix = argv.flag?('no-fix', false)
  super
end

Class Method Details

.optionsObject

self.description = <<-DESC

替代 Cocoapods 原生 install,可以自动解决库中冲突 lib

DESC



10
11
12
13
14
# File 'lib/cocoapods-install_tal/command/install_tal.rb', line 10

def self.options
  [
    ['--no-fix', 'not fix conflict after install before generate project']
  ].concat(super)
end

Instance Method Details

#installer_tal_for_configObject



21
22
23
# File 'lib/cocoapods-install_tal/command/install_tal.rb', line 21

def installer_tal_for_config
  InstallerTal.new(config.sandbox, config.podfile, config.lockfile, !@no_fix)
end

#runObject



25
26
27
28
29
30
31
# File 'lib/cocoapods-install_tal/command/install_tal.rb', line 25

def run
  verify_podfile_exists!
  installer = installer_tal_for_config
  installer.repo_update = repo_update?(:default => false)
  installer.update = false
  installer.install!
end