Class: StreamCapture::Core
- Inherits:
-
Object
- Object
- StreamCapture::Core
- Defined in:
- lib/stream_capture/core.rb
Overview
:nodoc:
Instance Method Summary collapse
Instance Method Details
#std_both(&block) ⇒ Object
37 38 39 40 41 42 |
# File 'lib/stream_capture/core.rb', line 37 def std_both(&block) string_io = StringIO.new capture(:stdout, string_io) do capture(:stderr, string_io, &block) end end |
#stderr(&block) ⇒ Object
33 34 35 |
# File 'lib/stream_capture/core.rb', line 33 def stderr(&block) capture(:stderr, &block) end |
#stdout(&block) ⇒ Object
29 30 31 |
# File 'lib/stream_capture/core.rb', line 29 def stdout(&block) capture(:stdout, &block) end |