StringIO

class StringIO

Parent:
Data
Included modules:
Enumerable, IO::generic_readable, IO::generic_writable

Pseudo I/O on String object.

Commonly used to simulate `$stdio` or `$stderr`

Examples

require 'stringio'

io = StringIO.new
io.puts "Hello World"
io.string #=> "Hello World\n"

Public Class Methods