Class: Xctracker::StandardOutputReporter

Inherits:
AbstractReporter show all
Defined in:
lib/xctracker/reporters/standard_output_reporter.rb

Instance Attribute Summary

Attributes inherited from AbstractReporter

#options

Instance Method Summary collapse

Methods inherited from AbstractReporter

#initialize

Constructor Details

This class inherits a constructor from Xctracker::AbstractReporter

Instance Method Details

#report!(executions) ⇒ Object



5
6
7
8
# File 'lib/xctracker/reporters/standard_output_reporter.rb', line 5

def report!(executions)
  filtered = filter_executions(executions)
  puts table_for(filtered)
end

#table_for(executions) ⇒ Object



10
11
12
13
14
15
16
17
18
# File 'lib/xctracker/reporters/standard_output_reporter.rb', line 10

def table_for(executions)
  Terminal::Table.new do |t|
    t << ['File', 'Line', 'Method name', 'Time(ms)']
    t << :separator
    executions.each do |execution|
      t << [execution.path, execution.line, execution.method_name, execution.time]
    end
  end
end