class Pod::Command::Bin::Repo::Update

Public Class Methods

new(argv) click to toggle source
Calls superclass method Pod::Command::Bin::new
# File lib/cocoapods-lhj-bin/command/bin/repo/update.rb, line 20
def initialize(argv)
  @all = argv.flag?('all')
  @name = argv.shift_argument
  super
end
options() click to toggle source
Calls superclass method
# File lib/cocoapods-lhj-bin/command/bin/repo/update.rb, line 14
def self.options
  [
    ['--all', '更新所有私有源,默认只更新二进制相关私有源']
  ].concat(super)
end

Public Instance Methods

run() click to toggle source
# File lib/cocoapods-lhj-bin/command/bin/repo/update.rb, line 26
def run
  show_output = !config.silent?
  if @name || @all
    config.sources_manager.update(@name, show_output)
  else
    Parallel.each(valid_sources, in_threads: 4) do |source|
      UI.puts "更新私有源仓库 #{source.to_s}".yellow
      source.update(show_output)
    end
  end
end