free_mutant/lib/mutant/reporter/cli/printer/killer.rb
Markus Schirp dbc6455ae1 Finish cli reporter refactoring
Readds mutation reporting
2013-06-21 23:52:57 +02:00

42 lines
859 B
Ruby

module Mutant
class Reporter
class CLI
class Printer
# Printer for killer results
class Killer < self
handle(Mutant::Killer::Forked)
# Run printer
#
# @return [undefined]
#
# @api private
#
def run
if success?
char('.', Color::GREEN)
return
end
char('F', Color::RED)
end
# Write colorized char
#
# @param [String] char
# @param [Color]
#
# @return [undefined]
#
# @api private
#
def char(char, color)
output.write(colorize(color, char))
output.flush
end
end # Killer
end # Printer
end # CLI
end # Reporter
end # Mutant