Class: StreamWrapper
Instance Method Summary collapse
- #stderr_flush ⇒ Object
- #stderr_puts(string) ⇒ Object
- #stdout_flush ⇒ Object
- #stdout_override(&fnc) ⇒ Object
- #stdout_puts(string) ⇒ Object
Instance Method Details
#stderr_flush ⇒ Object
24 25 26 |
# File 'lib/ceedling/stream_wrapper.rb', line 24 def stderr_flush $stderr.flush end |
#stderr_puts(string) ⇒ Object
20 21 22 |
# File 'lib/ceedling/stream_wrapper.rb', line 20 def stderr_puts(string) $stderr.puts(string) end |
#stdout_flush ⇒ Object
16 17 18 |
# File 'lib/ceedling/stream_wrapper.rb', line 16 def stdout_flush $stdout.flush end |
#stdout_override(&fnc) ⇒ Object
4 5 6 |
# File 'lib/ceedling/stream_wrapper.rb', line 4 def stdout_override(&fnc) @stdout_overide_fnc = fnc end |
#stdout_puts(string) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/ceedling/stream_wrapper.rb', line 8 def stdout_puts(string) if @stdout_overide_fnc @stdout_overide_fnc.call(string) else $stdout.puts(string) end end |