Class: Flakie::Reporters::TicTacToe

Inherits:
Base
  • Object
show all
Defined in:
lib/flakie/reporters/tic_tac_toe.rb

Constant Summary collapse

CHARACTER_SUCCESS =
"o"
CHARACTER_FAILURE =
"x"
CHARACTER_SUCCESS_COLORED =
"\e[32m#{CHARACTER_SUCCESS}\e[0m".freeze
CHARACTER_FAILURE_COLORED =
"\e[31m#{CHARACTER_FAILURE}\e[0m".freeze
CHARACTER_NEWLINE =
"\n"

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Flakie::Reporters::Base

Instance Method Details

#closeObject



19
20
21
22
# File 'lib/flakie/reporters/tic_tac_toe.rb', line 19

def close
  output.puts(CHARACTER_NEWLINE)
  super
end

#openObject



12
13
# File 'lib/flakie/reporters/tic_tac_toe.rb', line 12

def open
end

#report(report) ⇒ Object



15
16
17
# File 'lib/flakie/reporters/tic_tac_toe.rb', line 15

def report(report)
  report.last_run.success? ? report_success : report_failure
end