Method: Rri::Engine#initialize
- Defined in:
- lib/rri/engine.rb
#initialize(options = {}) ⇒ Engine
Create a new instance of Engine
119 120 121 122 123 124 125 126 127 128 129 |
# File 'lib/rri/engine.rb', line 119 def initialize( = {}) = DEFAULT_ENGINE_OPTIONS.merge() @engine = Jri::JRIEngine.new([:r_arguments].to_java(:string), [:callback_object], [:run_repl]) # the R thread wont die unless we call #close on @engine, so make sure this # happens when this object is finalized. ObjectSpace.define_finalizer(self, self.class.finalize(@engine)) end |