Sha256: 33f02922a5e77687f2947bbc96e693954ad499d8498b4731c03ad189a7ed2442
Contents?: true
Size: 549 Bytes
Versions: 40
Compression:
Stored size: 549 Bytes
Contents
require 'forwardable' module Cucumber module Formatter # Adapter to make #puts/#print/#flush work with colours on Windows class ColorIO extend Forwardable def_delegators :@kernel, :puts, :print # win32console colours only work when sent to Kernel def_delegators :@stdout, :flush, :tty?, :write def initialize @kernel = Kernel @stdout = STDOUT end # Ensure using << still gets colours in win32console def <<(output) print(output) self end end end end
Version data entries
40 entries across 40 versions & 7 rubygems