Class: Treebis::Capture3::StdoutStringIoHack

Inherits:
File
  • Object
show all
Defined in:
lib/treebis.rb

Instance Method Summary collapse

Constructor Details

#initializeStdoutStringIoHack

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_strObject



88
89
90
91
# File 'lib/treebis.rb', line 88

def to_str
  @buffer.rewind
  @buffer.read
end