The Ruby Way, Second Edition: Solutions and Techniques in Ruby Programming (2nd Edition)
2.10. Using Strings As IO Objects
Besides sprintf and scanf, there is another way to fake input/output to a stringthe StringIO class. Because this is a very IO-like object, we cover it in a later chapter. See section 10.1.24, "Treating a String As a File." |
Категории