Class: Pod::Command::Repo::List

Inherits:
Repo
  • Object
show all
Defined in:
lib/cocoapods/command/repo/list.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(argv) ⇒ List

Returns a new instance of List.



15
16
17
18
# File 'lib/cocoapods/command/repo/list.rb', line 15

def initialize(argv)
  @count_only = argv.flag?('count-only')
  super
end

Class Method Details

.optionsObject



11
12
13
# File 'lib/cocoapods/command/repo/list.rb', line 11

def self.options
  [['--count-only', 'Show the total number of repos']].concat(super)
end

Instance Method Details

#runObject



32
33
34
35
36
# File 'lib/cocoapods/command/repo/list.rb', line 32

def run
  sources = config.sources_manager.all
  print_sources(sources) unless @count_only
  print_count_of_sources(sources)
end