class HighLine::Test::Driver

Attributes

input_stream[R]
output_stream[R]

Public Class Methods

new(input_stream, output_stream) click to toggle source
# File lib/highline/test/driver.rb, line 8
def initialize(input_stream, output_stream)
  @input_stream = input_stream
  @output_stream = output_stream
end

Public Instance Methods

high_line() click to toggle source

Creates and returns a HighLine instance, set up to use the supplied streams

# File lib/highline/test/driver.rb, line 14
def high_line
  return @high_line if @high_line
  HighLine.track_eof = false
  @high_line = HighLine.new(input_stream, output_stream)
end
inject(text) click to toggle source

Adds text to the output stream

# File lib/highline/test/driver.rb, line 21
def inject(text)
  @output_stream << text
end