free_mutant/lib/mutant/reporter/cli.rb
2014-06-30 13:19:47 +00:00

50 lines
856 B
Ruby

module Mutant
class Reporter
# Reporter that reports in human readable format
class CLI < self
include Concord.new(:output)
NL = "\n".freeze
# Report progress object
#
# @param [Object] object
#
# @return [self]
#
# @api private
#
def progress(object)
Progress.run(output, object)
self
end
# Report warning
#
# @param [String] message
#
# @return [self]
#
# @api private
#
def warn(message)
output.puts(message)
self
end
# Report object
#
# @param [Object] object
#
# @return [self]
#
# @api private
#
def report(object)
Report.run(output, object)
self
end
end # CLI
end # Reporter
end # Mutant