Class: IoCapture
- Inherits:
-
Object
- Object
- IoCapture
- Defined in:
- lib/cucumber_rake_runner/io_capture.rb
Class Method Summary collapse
Class Method Details
.stderr ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/cucumber_rake_runner/io_capture.rb', line 15 def self.stderr temp_stderr_buffer = StringIO.new begin old_stderr = $stderr $stderr = temp_stderr_buffer yield ensure $stderr = old_stderr end temp_stderr_buffer.string end |
.stdout ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 |
# File 'lib/cucumber_rake_runner/io_capture.rb', line 3 def self.stdout temp_stdout_buffer = StringIO.new begin old_stdout = $stdout $stdout = temp_stdout_buffer yield ensure $stdout = old_stdout end temp_stdout_buffer.string end |