Sha256: 6b8e640ecb26bf51f875098c62865649ab9761fcb6b0315d7463721d2120266f
Contents?: true
Size: 684 Bytes
Versions: 2
Compression:
Stored size: 684 Bytes
Contents
require 'terminal-table' require 'term/ansicolor' require 'benchmark' class String include Term::ANSIColor end module Koality module Reporter class Base def self.start(&block) reporter = new time = Benchmark.measure do yield reporter end puts "-- #{'%0.3f' % time.real}s\n\n" end private def color(message, color_name) if Koality.options.colorize_output? message.to_s.send(color_name) else message end end def build_table Terminal::Table.new :style => {:width => 140, :padding_left => 2, :padding_right => 2} end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
koality-1.0.1 | lib/koality/reporter/base.rb |
koality-1.0.0 | lib/koality/reporter/base.rb |