File: ioredirect.rb

# ioredirect.rb

Path: | lib/more/facets/ioredirect.rb
Last Update: | Tue Aug 10 17:25:06 -0600 2010

# IORedirect

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

## History

- IORedirect was ported from Paul Brannan‘s Ruby Treasures.

## Authors

- Paul Brannan <paul@atdesk.com>

# Copying

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.

[Validate]