class Pod::Command::RepoTal::List

Public Class Methods

new(argv) click to toggle source
Calls superclass method
# File lib/cocoapods-repo-tal/command/repo/list.rb, line 15
def initialize(argv)
  @count_only = argv.flag?('count-only')
  super
end
options() click to toggle source
Calls superclass method
# 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

Public Instance Methods

run() click to toggle source

@output Examples:

master
- type: git (master)
- URL:  https://github.com/CocoaPods/Specs.git
- path: /Users/lascorbe/.cocoapods/repos/master

test
- type: local copy
- URL: file:///Users/lascorbe/.cocoapods/repos/test
- path: /Users/lascorbe/.cocoapods/repos/test
# 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

Private Instance Methods

print_count_of_sources(sources) click to toggle source

Pretty-prints the number of sources.

@param [Array<Source>] sources

The sources whose count should be printed.

@return [void]

print_source(source) click to toggle source

Pretty-prints the source at the given path.

@param [Source] source

The source repository to be printed.

@return [void]

print_sources(sources) click to toggle source

Pretty-prints the given sources.

@param [Array<Source>] sources

The sources that should be printed.

@return [void]