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