class CodeRunner::Cronos::EngineHandler

Public Class Methods

new(engine) click to toggle source
# File lib/cronoscrmod/cronos.rb, line 10
def initialize(engine)
        @engine = engine
        @cronos_path_set = false
        @pathc
end

Public Instance Methods

new_file() click to toggle source
# File lib/cronoscrmod/cronos.rb, line 27
def new_file
        @engine.eval_string("zuicreate")
        STDIN.gets
end
start_cronos(path) click to toggle source
# File lib/cronoscrmod/cronos.rb, line 15
def start_cronos(path)
        return
        return if @cronos_path_set
        raise "cronos not found in #{path}" unless FileTest.exist?("#{path}/cronos.m")
        @engine.eval_string("addpath #{File.expand_path(path)};")
        @engine.eval_string("addpath #{File.expand_path(path)}/interface;")
        @engine.eval_string("addpath #{File.expand_path(path)}/op;")
        @engine.eval_string("cronos")
        @engine.eval_string("zuidirect")
        @cronos_path_set = true
end