module RSpeed::Reporter
Public Instance Methods
call()
click to toggle source
# File lib/rspeed/reporter.rb, line 9 def call diff = RSpeed::Differ.final_diff print_table( headings: %w[Global Value], rows: [ ['Actual Time', diff[:actual_time]], ['Removed Time', diff[:removed_time]], ['Added Time', diff[:added_time]], ] ) end
print_files(items)
click to toggle source
# File lib/rspeed/reporter.rb, line 23 def print_files(items) total_specs = items.size headings = ["#{total_specs} specs", "Pipe #{RSpeed::Env.pipe}/#{RSpeed::Env.pipes}", 'Last Time'] rows = items.map.with_index do |item, index| [format('%02d', index + 1), item[:file], item[:time].to_s] end print_table(headings: headings, rows: rows) end
print_table(headings:, rows:)
click to toggle source
# File lib/rspeed/reporter.rb, line 34 def print_table(headings:, rows:) puts(Terminal::Table.new(headings: headings, rows: rows, title: 'RSpeed')) end