Module: GitAnalyzer::Formatter::Pretty

Defined in:
lib/git_analyzer/formatter/pretty.rb

Constant Summary collapse

BAR_LENGTH =
80
CHAR =
'█'

Class Method Summary collapse

Class Method Details

.write(data) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/git_analyzer/formatter/pretty.rb', line 11

def write(data)
  return puts "No Commits found".red if data.empty?

  top_committer_commits = data.first[:commits]

  output = []
  data.each do |row|
    output << generate_row(row, top_committer_commits)
  end

  puts output
end