2012-08-15 22:10:54 -04:00
|
|
|
module Mutant
|
|
|
|
class Reporter
|
|
|
|
# Reporter that reports in human readable format
|
|
|
|
class CLI < self
|
2014-05-11 09:47:29 -04:00
|
|
|
include Concord.new(:output)
|
2012-08-29 07:36:29 -04:00
|
|
|
|
2014-05-12 09:48:15 -04:00
|
|
|
# Report progress object
|
|
|
|
#
|
|
|
|
# @param [Object] object
|
|
|
|
#
|
|
|
|
# @return [self]
|
|
|
|
#
|
|
|
|
# @api private
|
|
|
|
#
|
|
|
|
def progress(object)
|
|
|
|
Progress.run(output, object)
|
|
|
|
self
|
|
|
|
end
|
|
|
|
|
2014-06-30 09:19:47 -04:00
|
|
|
# Report warning
|
|
|
|
#
|
|
|
|
# @param [String] message
|
|
|
|
#
|
|
|
|
# @return [self]
|
|
|
|
#
|
|
|
|
# @api private
|
|
|
|
#
|
|
|
|
def warn(message)
|
|
|
|
output.puts(message)
|
|
|
|
self
|
|
|
|
end
|
|
|
|
|
2013-04-20 20:20:18 -04:00
|
|
|
# Report object
|
|
|
|
#
|
|
|
|
# @param [Object] object
|
|
|
|
#
|
|
|
|
# @return [self]
|
|
|
|
#
|
|
|
|
# @api private
|
|
|
|
#
|
|
|
|
def report(object)
|
2014-05-12 09:48:15 -04:00
|
|
|
Report.run(output, object)
|
2013-04-20 20:20:18 -04:00
|
|
|
self
|
|
|
|
end
|
|
|
|
|
2013-06-14 14:54:02 -04:00
|
|
|
end # CLI
|
|
|
|
end # Reporter
|
|
|
|
end # Mutant
|