Module: ANTLR3::Test::CaptureOutput

Defined in:
lib/antlr3/test/functional.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) capture(*args)



204
205
206
# File 'lib/antlr3/test/functional.rb', line 204

def capture( *args )
  output_buffer.write( *args )
end

- (Object) output



196
197
198
# File 'lib/antlr3/test/functional.rb', line 196

def output
  output_buffer.string
end

- (Object) output_buffer



191
192
193
194
# File 'lib/antlr3/test/functional.rb', line 191

def output_buffer
  defined?( @output_buffer ) or @output_buffer = StringIO.new( '' )
  @output_buffer
end

- (Object) say(*args)



200
201
202
# File 'lib/antlr3/test/functional.rb', line 200

def say( *args )
  output_buffer.puts( *args )
end