Class: Cucumber::Formatter::ColorIO
- Extended by:
- Forwardable
- Defined in:
- lib/cucumber/formatter/color_io.rb
Overview
Adapter to make #puts/#print/#flush work with win32console
Instance Method Summary collapse
-
#<<(output) ⇒ Object
Ensure using << still gets colours in win32console.
-
#initialize(kernel, stdout) ⇒ ColorIO
constructor
A new instance of ColorIO.
Constructor Details
#initialize(kernel, stdout) ⇒ ColorIO
Returns a new instance of ColorIO.
11 12 13 14 |
# File 'lib/cucumber/formatter/color_io.rb', line 11 def initialize(kernel, stdout) @kernel = kernel @stdout = stdout end |
Instance Method Details
#<<(output) ⇒ Object
Ensure using << still gets colours in win32console
17 18 19 20 |
# File 'lib/cucumber/formatter/color_io.rb', line 17 def <<(output) print(output) self end |