class Redirector < Object
s = StringIO.new r = Redirector.redirect($stdout, s) do $stdout.puts "this is a test" end
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