Class LTF::StringCatcher
In: lib/ltf/string_catcher.rb
Parent: Object

StringCatcher can be used in place of IO objects to collect output from calls to puts or print. For example, it may be useful to pass in to MaximaRunner#run.

Methods

clear   new   print   puts   to_s  

Attributes

str  [R] 

Public Class methods

Public Instance methods

Clear the contained String back to ’’.

Add a String (see IO#print).

  • s: The String to add.

Add a String plus a newline (see IO#puts).

  • s: The String to add.

Convert to a String.

[Validate]