Class: Croaky::Stream::JavaStdErrStream
- Inherits:
-
StdErrStream
- Object
- StdErrStream
- Croaky::Stream::JavaStdErrStream
- Defined in:
- lib/croaky/stream/java_std_err_stream.rb
Overview
Error stream for Java
Instance Attribute Summary collapse
-
#java_stderr ⇒ Object
Returns the value of attribute java_stderr.
-
#pw_err ⇒ Object
Returns the value of attribute pw_err.
Attributes inherited from StdErrStream
Instance Method Summary collapse
Instance Attribute Details
#java_stderr ⇒ Object
Returns the value of attribute java_stderr.
9 10 11 |
# File 'lib/croaky/stream/java_std_err_stream.rb', line 9 def java_stderr @java_stderr end |
#pw_err ⇒ Object
Returns the value of attribute pw_err.
9 10 11 |
# File 'lib/croaky/stream/java_std_err_stream.rb', line 9 def pw_err @pw_err end |
Instance Method Details
#capture_io ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/croaky/stream/java_std_err_stream.rb', line 11 def capture_io super self.java_stderr = java.lang.System.err pw_err&.close self.pw_err = err_stream java.lang.System.setErr(pw_err) end |
#read_captured_io ⇒ Object
27 28 29 30 31 |
# File 'lib/croaky/stream/java_std_err_stream.rb', line 27 def read_captured_io captured = super captured << read_err_stream end |
#restore_io ⇒ Object
20 21 22 23 24 25 |
# File 'lib/croaky/stream/java_std_err_stream.rb', line 20 def restore_io super java.lang.System.setErr(java_stderr) pw_err.close end |