Class: Pod::Command::RepoTal::List

Inherits:
Pod::Command::RepoTal show all
Defined in:
lib/cocoapods-repo-tal/command/repo/list.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Pod::Command::RepoTal

#dir

Constructor Details

#initialize(argv) ⇒ List

Returns a new instance of List.



15
16
17
18
# File 'lib/cocoapods-repo-tal/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-repo-tal/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-repo-tal/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