class

StringIO

v1_8_7_330 - Show latest stable - Superclass: Object

Pseudo I/O on String object.

Included modules

  • Enumerable

Files

  • ext/stringio/stringio.c
  • lib/yaml/stringio.rb

1Note

Useful for mocking out IO methods like #gets and #puts

dennyabraham ยท Oct 11, 2010

This class is helpful when testing certain classes of software libraries that are dependent on console input and output, similar to some testing uses of Java's StringBuffer