Method: Heist::REPL#initialize

Defined in:
lib/repl.rb

#initialize(options = {}) ⇒ REPL

Returns a new instance of REPL.



6
7
8
9
10
11
12
13
14
# File 'lib/repl.rb', line 6

def initialize(options = {})
  @runtime = Runtime.new(options)
  @scope = Runtime::FileScope.new(@runtime.top_level, File.expand_path('.'))
  @results = []
  
  @runtime.define('~') { |x| @results[-x] }
  
  reset!
end