Module: Debtective::StderrHelper
- Included in:
- Comments::Export
- Defined in:
- lib/debtective/stderr_helper.rb
Overview
Silence the $stderr
Instance Method Summary collapse
-
#suppress_stderr ⇒ Object
Prevent logs in stderr.
Instance Method Details
#suppress_stderr ⇒ Object
Prevent logs in stderr
8 9 10 11 12 13 14 |
# File 'lib/debtective/stderr_helper.rb', line 8 def suppress_stderr original_stderr = $stderr.clone $stderr.reopen(File.new("/dev/null", "w")) yield ensure $stderr.reopen(original_stderr) end |