Top Level Namespace
- Includes:
- OwaspZap
Defined Under Namespace
Modules: Zapr
Instance Method Summary collapse
Instance Method Details
#dev_null(&block) ⇒ Object
1 2 3 4 5 6 7 8 9 |
# File 'lib/zapr/lib.rb', line 1 def dev_null(&block) begin orig_stdout = $stdout.dup # does a dup2() internally $stdout.reopen('/dev/null', 'w') yield ensure $stdout.reopen(orig_stdout) end end |