protected override ScriptRuntime /*!*/ CreateRuntime() { string root = IronRubyToolsPackage.Instance.IronRubyBinPath; string configPath = IronRubyToolsPackage.Instance.IronRubyExecutable + ".config"; LanguageSetup existingRubySetup = null; LanguageSetup rubySetup = Ruby.CreateRubySetup(); if (File.Exists(configPath)) { try { existingRubySetup = GetSetupByName(ScriptRuntimeSetup.ReadConfiguration(configPath), "IronRuby"); } catch { // TODO: report the error } } if (existingRubySetup != null) { var options = new RubyOptions(existingRubySetup.Options); rubySetup.Options["StandardLibraryPath"] = NormalizePaths(root, new[] { options.StandardLibraryPath })[0]; rubySetup.Options["RequiredPaths"] = NormalizePaths(root, options.RequirePaths); rubySetup.Options["SearchPaths"] = NormalizePaths(root, options.SearchPaths); } var runtimeSetup = new ScriptRuntimeSetup(); runtimeSetup.LanguageSetups.Add(rubySetup); return(RemoteScriptFactory.CreateRuntime(runtimeSetup)); }
public RubyScriptingRuntime() { _defaultLanguageSetup = Ruby.CreateRubySetup(); var setup = new ScriptRuntimeSetup(); setup.LanguageSetups.Add(_defaultLanguageSetup); _scriptingRuntime = new ScriptRuntime(setup); }
private static ScriptRuntime InitializeIronRuby() { var rubySetup = Ruby.CreateRubySetup(); var runtimeSetup = new ScriptRuntimeSetup(); runtimeSetup.LanguageSetups.Add(rubySetup); runtimeSetup.DebugMode = true; return(Ruby.CreateRuntime(runtimeSetup)); }
private static RubyEngine InitializeIronRuby(IPathProvider vpp) { var rubySetup = Ruby.CreateRubySetup(); var runtimeSetup = new ScriptRuntimeSetup(); runtimeSetup.LanguageSetups.Add(rubySetup); runtimeSetup.DebugMode = true; // runtimeSetup.HostType = typeof (MvcScriptHost); var runtime = Ruby.CreateRuntime(runtimeSetup); return(new RubyEngine(runtime, vpp)); }
public ScriptRuntime CreateRuntime() { var rubySetup = Ruby.CreateRubySetup(); rubySetup.Options["InterpretedMode"] = true; var runtimeSetup = new ScriptRuntimeSetup(); runtimeSetup.LanguageSetups.Add(rubySetup); runtimeSetup.DebugMode = true; return(Ruby.CreateRuntime(runtimeSetup)); }
protected override void EstablishContext() { if (_scriptRuntime == null) { var rubySetup = Ruby.CreateRubySetup(); rubySetup.Options["InterpretedMode"] = true; var runtimeSetup = new ScriptRuntimeSetup(); runtimeSetup.LanguageSetups.Add(rubySetup); runtimeSetup.DebugMode = true; _scriptRuntime = Ruby.CreateRuntime(runtimeSetup); } _engine = _scriptRuntime.GetRubyEngine(); _context = Ruby.GetExecutionContext(_engine); }
protected override LanguageSetup CreateLanguageSetup() { return(Ruby.CreateRubySetup()); }
public static ScriptRuntime GetRuntime() { return(Nova.CreateRuntime(Nova.CreateNovaSetup(), Ruby.CreateRubySetup())); }