class Mutest::Reporter::CLI
Reporter
that reports in human readable format
Public Class Methods
build(output)
click to toggle source
Build reporter
@param [IO] output
@return [Reporter::CLI]
# File lib/mutest/reporter/cli.rb, line 12 def self.build(output) tput = Tput.detect tty = output.respond_to?(:tty?) && output.tty? format = if !Mutest.ci? && tty && tput Format::Framed.new(tty: tty, tput: tput) else Format::Progressive.new(tty: tty) end new(output, format) end
Public Instance Methods
delay()
click to toggle source
Report delay in seconds
TODO: Move this to a callback registration
@return [Float]
# File lib/mutest/reporter/cli.rb, line 49 def delay format.delay end
progress(status)
click to toggle source
Report progress object
@param [Parallel::Status] status
@return [self]
# File lib/mutest/reporter/cli.rb, line 39 def progress(status) write(format.progress(status)) self end
report(env)
click to toggle source
Report env
@param [Result::Env] env
@return [self]
# File lib/mutest/reporter/cli.rb, line 68 def report(env) Printer::EnvResult.call(output, env) self end
start(env)
click to toggle source
Report start
@param [Env::Bootstrap] env
@return [self]
# File lib/mutest/reporter/cli.rb, line 29 def start(env) write(format.start(env)) self end
warn(message)
click to toggle source
Report warning
@param [String] message
@return [self]
# File lib/mutest/reporter/cli.rb, line 58 def warn(message) output.puts(message) self end
Private Instance Methods
write(frame)
click to toggle source
Write output frame
@param [String] frame
@return [undefined]
# File lib/mutest/reporter/cli.rb, line 80 def write(frame) output.write(frame) end