Class: SortedSearch::CocoapodsPrinter
- Defined in:
- lib/sorted_search/printers/pods_printer.rb
Overview
Printer for pods specification
Instance Method Summary collapse
Instance Method Details
#print(pods) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/sorted_search/printers/pods_printer.rb', line 10 def print(pods) pods.each do |pod| Pod::UI.title("-> #{pod.name} (#{pod.version})".green, '', 1) do next unless pod.github_last_activity stars = [0x2605].pack('U') + ' ' + pod.github_watchers.to_s + ' ' forks = [0x2442].pack('U') + ' ' + pod.github_forks.to_s + ' ' commit = 'Last commit: ' + pod.github_last_activity Pod::UI.puts_indented pod.summary Pod::UI.puts_indented "pod '#{pod.name}', '~> #{pod.version}'" Pod::UI.puts_indented pod.homepage Pod::UI.puts_indented stars.yellow + forks.yellow Pod::UI.puts_indented commit.yellow end end Pod::UI.puts end |