| Path: | lib/more/facets/ioredirect.rb |
| Last Update: | Tue Mar 30 10:17:49 -0600 2010 |
A class to redirect $stdout, or other IO object, to a StringIO object, or any other object with a write() method.
s = StringIO.new
r = Redirector.redirect($stdout, s) do
$stdout.puts "this is a test"
end
Copyright (C) 2002 Paul Brannan <paul@atdesk.com>
Ruby License
This module is free software. You may use, modify, and/or redistribute this software under the same terms as Ruby.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.