Total Complexity | 2 |
Total Lines | 16 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | require 'terminal-table' |
||
6 | class Cli |
||
7 | def initialize(output = STDOUT, table = Terminal::Table.new) |
||
8 | @output = output |
||
9 | @table = table |
||
10 | end |
||
11 | |||
12 | def report(entries) |
||
13 | @table << ['Entry', 'Elapsed Time', '# of calls'] |
||
14 | |||
15 | entries.each do |entry| |
||
16 | @table << [entry.name, entry.elapsed_time, entry.entries.size] |
||
17 | end |
||
18 | |||
19 | @output << @table |
||
20 | end |
||
21 | end |
||
22 | end |
||
25 |