| Class | IO::Redirect |
| In: |
lib/facet/io-redirect.rb
|
| Parent: | Object |
A class to redirect $stdout, or other IO object, to a StringIO object, or any other object with a write() method.
require 'raspberry/new/io-redirect'
s = StringIO.new
r = Redirector.redirect($stdout, s) do
$stdout.puts "this is a test"
end