class Pod::Command::RepoArt::List
Constants
- UTIL
Public Class Methods
new(argv)
click to toggle source
Calls superclass method
# File lib/pod/command/repo_art/list.rb, line 23 def initialize(argv) init @count_only = argv.flag?('count-only') super end
options()
click to toggle source
Calls superclass method
# File lib/pod/command/repo_art/list.rb, line 17 def self.options [ ['--count-only', 'Show the total number of repos'] ].concat(super) end
Public Instance Methods
print_art_repos(repos)
click to toggle source
# File lib/pod/command/repo_art/list.rb, line 35 def print_art_repos(repos) for repo in repos UI.title repo.name do UI.puts "- URL: #{repo.url}" UI.puts "- Path: #{repo.path}" end end UI.puts "\n" end
print_art_repos_count(repos)
click to toggle source
# File lib/pod/command/repo_art/list.rb, line 45 def print_art_repos_count(repos) number_of_repos = repos.length repo_string = number_of_repos != 1 ? 'repos' : 'repo' UI.puts "#{number_of_repos} #{repo_string}\n".green end
run()
click to toggle source
# File lib/pod/command/repo_art/list.rb, line 29 def run repos = UTIL.get_art_repos print_art_repos(repos) unless @count_only print_art_repos_count(repos) end