Class: Treebis::Capture3::StdoutStringIoHack
- Inherits:
-
File
- Object
- File
- Treebis::Capture3::StdoutStringIoHack
- Defined in:
- lib/treebis.rb
Instance Method Summary collapse
-
#initialize ⇒ StdoutStringIoHack
constructor
A new instance of StdoutStringIoHack.
- #to_str ⇒ Object
Constructor Details
#initialize ⇒ StdoutStringIoHack
Returns a new instance of StdoutStringIoHack.
80 81 82 83 |
# File 'lib/treebis.rb', line 80 def initialize super('/dev/null','w+') @buffer = StringIO.new end |
Instance Method Details
#to_str ⇒ Object
88 89 90 91 |
# File 'lib/treebis.rb', line 88 def to_str @buffer.rewind @buffer.read end |