Class: SimpleStringIO
Instance Attribute Summary collapse
-
#str ⇒ Object
readonly
Returns the value of attribute str.
Instance Method Summary collapse
-
#initialize ⇒ SimpleStringIO
constructor
A new instance of SimpleStringIO.
- #write(str) ⇒ Object
Constructor Details
#initialize ⇒ SimpleStringIO
Returns a new instance of SimpleStringIO.
85 |
# File 'lib/carat/io-redirect.rb', line 85 def initialize; @str = ''; end |
Instance Attribute Details
#str ⇒ Object (readonly)
Returns the value of attribute str.
84 85 86 |
# File 'lib/carat/io-redirect.rb', line 84 def str @str end |
Instance Method Details
#write(str) ⇒ Object
86 |
# File 'lib/carat/io-redirect.rb', line 86 def write(str); @str << str; end |