hacks/io_redirector |
class Redirector < Object |
Example:
s = StringIO.new r = Redirector.redirect($stdout, s) do $stdout.puts "this is a test" end
Public Methods |
Start redirection from one IO object to any other object with a write() method.
from | the IO object to redirect from. |
---|---|
to | the object to redirect to. |
Start redirection, if it has not already been started.
Stop redirection, if it is occurring.
An exception-safe class method for redirection.
class SimpleStringIO < Object |
Public Methods |