Class: RobotLab::To::ExitSummary

Inherits:
Object
  • Object
show all
Defined in:
lib/robot_lab/to/exit_summary.rb

Overview

Prints the post-run summary to stdout.

Instance Method Summary collapse

Constructor Details

#initialize(run, config, abort_reason: nil) ⇒ ExitSummary

Returns a new instance of ExitSummary.



7
8
9
10
11
# File 'lib/robot_lab/to/exit_summary.rb', line 7

def initialize(run, config, abort_reason: nil)
  @run          = run
  @config       = config
  @abort_reason = abort_reason
end

Instance Method Details



13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/robot_lab/to/exit_summary.rb', line 13

def print
  stat       = @run.base_commit ? diff_stat : { insertions: 0, deletions: 0, files: 0 }
  aborted    = !@abort_reason.nil?
  good_iters = @run.commits
  fail_iters = @run.iteration - good_iters

  puts ""
  print_header(aborted)
  print_counters(good_iters, fail_iters, stat)
  print_paths
  print_next_steps
  puts ""
end