Module: Whatup::Server::Redirection
Instance Method Summary collapse
-
#redirect(stdin: $stdin, stdout: $stdout) ⇒ Object
Reroutes stdin and stdout inside a block.
Instance Method Details
#redirect(stdin: $stdin, stdout: $stdout) ⇒ Object
Reroutes stdin and stdout inside a block
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/whatup/server/redirection.rb', line 10 def redirect stdin: $stdin, stdout: $stdout original_stdin = $stdin original_stdout = $stdout $stdin = stdin $stdout = stdout yield ensure $stdin = original_stdin $stdout = original_stdout end |