Sha256: 5ceb8fc36f2d80df2008c3e81c2c683a2da3fb6a41260efc3ba2b750a5baa92a

Contents?: true

Size: 403 Bytes

Versions: 12

Compression:

Stored size: 403 Bytes

Contents

module Sprout

  class OutputBuffer < String
    
    def initialize *args
      super
      @characters = ''
    end

    def puts msg
      @characters << msg
    end

    def print msg
      @characters << msg
    end

    def printf msg
      @characters << msg
    end

    def read
      response = @characters
      @characters = ''
      response
    end
    
    def flush
    end

  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
sprout-1.1.18.pre lib/sprout/output_buffer.rb
sprout-1.1.17.pre lib/sprout/output_buffer.rb
sprout-1.1.16.pre lib/sprout/output_buffer.rb
sprout-1.1.15.pre lib/sprout/output_buffer.rb
sprout-1.1.14.pre lib/sprout/output_buffer.rb
sprout-1.1.13.pre lib/sprout/output_buffer.rb
sprout-1.1.11.pre lib/sprout/output_buffer.rb
sprout-1.1.10.pre lib/sprout/output_buffer.rb
sprout-1.1.7.pre lib/sprout/output_buffer.rb
sprout-1.1.5.pre lib/sprout/output_buffer.rb
sprout-1.1.4.pre lib/sprout/output_buffer.rb
sprout-1.1.3.pre lib/sprout/output_buffer.rb