/** * @deprecated use #newInstance() */ public static Ruby getDefaultInstance() { return newInstance(); }
/** * Get the global runtime. * * @return the global runtime */ public static synchronized Ruby getGlobalRuntime() { if (globalRuntime == null) { newInstance(); } return globalRuntime; }
/** * @deprecated use #newInstance() */ public static Ruby getDefaultInstance() { return newInstance(); }
public Ruby getThreadSafeRuntime() { if (runtime == null) { // stopped loading java library (runtime.getLoadService().require("java");) // during the intialization process. runtime = Ruby.newInstance(config); initialized = true; } return runtime; }
Ruby getRuntime() { if (runtime == null) { synchronized(this) { if (runtime == null) { runtime = Ruby.newInstance(config); } } } return runtime; }
Ruby getRuntime() { if (runtime == null) { synchronized(this) { if (runtime == null) { runtime = Ruby.newInstance(config); } } } return runtime; }
/** * Get the global runtime. * * @return the global runtime */ public static synchronized Ruby getGlobalRuntime() { if (globalRuntime == null) { newInstance(); } return globalRuntime; }
/** * Returns a new instance of the JRuby runtime configured with defaults. * * @return the JRuby runtime * @see org.jruby.RubyInstanceConfig */ public static Ruby newInstance() { return newInstance(new RubyInstanceConfig()); }
/** * Returns a new instance of the JRuby runtime configured with defaults. * * @return the JRuby runtime * @see org.jruby.RubyInstanceConfig */ public static Ruby newInstance() { return newInstance(new RubyInstanceConfig()); }
/** * Returns a new instance of the JRuby runtime configured with defaults. * * @return the JRuby runtime * @see org.jruby.RubyInstanceConfig */ public static Ruby newInstance() { return newInstance(new RubyInstanceConfig()); }
public Ruby getRuntime() { initializeLocalContext(); if (localContext.runtime == null) { // stopped loading java library (runtime.getLoadService().require("java");) // during the intialization process. localContext.runtime = Ruby.newInstance(config); localContext.initialized = true; } return localContext.runtime; }
Ruby getGlobalRuntime(AbstractLocalContextProvider provider) { if ( isGlobalRuntimeReady() ) { return Ruby.getGlobalRuntime(); } return Ruby.newInstance(provider.config); }
public Ruby getRuntime() { if (!Ruby.isGlobalRuntimeReady()) { return Ruby.newInstance(config); } return Ruby.getGlobalRuntime(); }
public Ruby getRuntime() { if (!Ruby.isGlobalRuntimeReady()) { return Ruby.newInstance(config); } return Ruby.getGlobalRuntime(); }
public Ruby getRuntime() { if (!Ruby.isGlobalRuntimeReady()) { return Ruby.newInstance(config); } return Ruby.getGlobalRuntime(); }
public void init(Page owner, String zslang) { super.init(owner, zslang); _runtime = Ruby.newInstance(); _runtime.setGlobalVariables(new Variables(_runtime)); }
/** * Get an instance of a JRuby runtime. * @param loadPaths additional load paths you wish to add * @param config a runtime configuration instance * @return an instance */ public static Ruby initialize(List<String> loadPaths, RubyInstanceConfig config) { Ruby runtime = Ruby.newInstance(config); runtime.getLoadService().addPaths(loadPaths); runtime.getLoadService().require("java"); return runtime; }
/** * Get an instance of a JRuby runtime. * @param loadPaths additional load paths you wish to add * @param config a runtime configuration instance * @return an instance */ public static Ruby initialize(List<String> loadPaths, RubyInstanceConfig config) { Ruby runtime = Ruby.newInstance(config); runtime.getLoadService().addPaths(loadPaths); runtime.getLoadService().require("java"); return runtime; }
/** * Get an instance of a JRuby runtime. * @param loadPaths additional load paths you wish to add * @param config a runtime configuration instance * @return an instance */ public static Ruby initialize(List loadPaths, RubyInstanceConfig config) { Ruby runtime = Ruby.newInstance(config); runtime.getLoadService().addPaths((List<String>)loadPaths); runtime.getLoadService().require("java"); return runtime; }
/** * Get an instance of a JRuby runtime. * @param loadPaths additional load paths you wish to add * @param config a runtime configuration instance * @return an instance */ public static Ruby initialize(List loadPaths, RubyInstanceConfig config) { Ruby runtime = Ruby.newInstance(config); runtime.getLoadService().addPaths((List<String>)loadPaths); runtime.getLoadService().require("java"); return runtime; }