class Basic101::Main

Public Class Methods

new(argv) click to toggle source
# File lib/basic101/main.rb, line 7
def initialize(argv)
  @args = Arguments.new(argv)
end

Public Instance Methods

run() click to toggle source
# File lib/basic101/main.rb, line 11
def run
  program = Program.load(ARGF)
  runtime = Runtime.new(:program => program)
  if @args.transcript
    runtime.transcript = Transcript.make(@args.filenames.first)
  end
  runtime.randomize if @args.randomize
  runtime.run
rescue Error => e
  puts e
  exit 1
end