Class: Croaky::Stream::StdErrStream
- Inherits:
-
Object
- Object
- Croaky::Stream::StdErrStream
- Includes:
- IO::IoCapturable
- Defined in:
- lib/croaky/stream/std_err_stream.rb
Overview
Standard error stream
Direct Known Subclasses
Instance Attribute Summary collapse
-
#stderr_str_io ⇒ Object
Returns the value of attribute stderr_str_io.
Instance Method Summary collapse
Instance Attribute Details
#stderr_str_io ⇒ Object
Returns the value of attribute stderr_str_io.
13 14 15 |
# File 'lib/croaky/stream/std_err_stream.rb', line 13 def stderr_str_io @stderr_str_io end |
Instance Method Details
#capture_io ⇒ Object
15 16 17 18 |
# File 'lib/croaky/stream/std_err_stream.rb', line 15 def capture_io self.stderr_str_io = StringIO.new $stderr = stderr_str_io end |
#read_captured_io ⇒ Object
24 25 26 |
# File 'lib/croaky/stream/std_err_stream.rb', line 24 def read_captured_io [stderr_str_io.string] end |
#restore_io ⇒ Object
20 21 22 |
# File 'lib/croaky/stream/std_err_stream.rb', line 20 def restore_io $stderr = STDERR end |