17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# File 'lib/helpers/terminal_helper.rb', line 17
def render(result, ruby_info: nil)
names = result.keys.sort
rows = names.map { |name| build_row(name, result[name]) }
widths = column_widths(rows)
lines = []
lines << (widths)
lines << separator_line(widths)
names.each_with_index do |name, i|
lines << row_line(rows[i], widths)
lines.concat(sub_lines(result[name]))
end
lines << ""
lines << summary_line(result)
lines << ruby_summary_line(ruby_info) if ruby_info
lines.join("\n")
end
|