Sha256: 73be03e9e697cad1f61f23ac57212234b0db51738cb7de1423914139448118bc
Contents?: true
Size: 540 Bytes
Versions: 74
Compression:
Stored size: 540 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? 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
74 entries across 74 versions & 6 rubygems