lib/sprout/output_buffer.rb in sprout-1.1.2.pre vs lib/sprout/output_buffer.rb in sprout-1.1.3.pre

- old
+ new

@@ -1,34 +1,33 @@ module Sprout - class OutputBuffer < Logger + class OutputBuffer < String def initialize *args super @characters = '' end def puts msg - flush if @characters.size > 0 - info msg + @characters << msg end def print msg @characters << msg - flush end def printf msg @characters << msg - flush end + + def read + response = @characters + @characters = '' + response + end def flush - if @characters.match /\n/ - info @characters - @characters = '' - end end end end