public class IsolatedScriptingContainer extends ScriptingContainer
Thread.currentTHread.getContextClassLoader().getResourceAsStream(...)
new URL( uri ).openStream()
, i.e. new URL(classloader.getResource().toString()).openStream()
has to work for
those classloaders. felix, knoplerfish and equinox OSGi framework do work.
NOTE: Gem.path
is base for determine the Gem::Specification.dirs
and Gem::Specification.dirs
is
used to find gemspec files of the installed gems.Constructor and Description |
---|
IsolatedScriptingContainer() |
IsolatedScriptingContainer(LocalContextScope scope) |
IsolatedScriptingContainer(LocalContextScope scope,
LocalVariableBehavior behavior) |
IsolatedScriptingContainer(LocalContextScope scope,
LocalVariableBehavior behavior,
boolean lazy) |
IsolatedScriptingContainer(LocalVariableBehavior behavior) |
Modifier and Type | Method and Description |
---|---|
void |
addGemPath(ClassLoader cl) |
void |
addGemPath(ClassLoader cl,
String ref) |
protected void |
addGemPath(String uri) |
void |
addLoadPath(ClassLoader cl) |
void |
addLoadPath(ClassLoader cl,
String ref) |
protected void |
addLoadPath(String uri) |
void |
setEnvironment(Map environment)
Changes an environment variables' map.
|
callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callMethod, callSuper, callSuper, clear, finalize, get, get, getArgv, getAttribute, getAttributeMap, getClassCache, getClassLoader, getCompatVersion, getCompileMode, getCurrentDirectory, getEnvironment, getErr, getError, getErrorWriter, getHomeDirectory, getIn, getInput, getInstance, getJitLogEvery, getJitMax, getJitMaxSize, getJitThreshold, getKCode, getLoadPaths, getLoadServiceCreator, getOut, getOutput, getProfile, getProfileOutput, getProfilingMode, getProperty, getProvider, getReader, getRecordSeparator, getRuntime, getScriptFilename, getSupportedRubyVersion, getVarMap, getWriter, isNativeEnabled, isObjectSpaceEnabled, isRunRubyInProcess, newObjectAdapter, newRuntimeAdapter, parse, parse, parse, parse, put, put, remove, remove, removeAttribute, resetErrorWriter, resetWriter, runRubyMethod, runRubyMethod, runScriptlet, runScriptlet, runScriptlet, runScriptlet, setArgv, setAttribute, setClassCache, setClassLoader, setCompatVersion, setCompileMode, setCurrentDirectory, setError, setError, setErrorWriter, setHomeDirectory, setInput, setInput, setJitLogEvery, setJitMax, setJitMaxSize, setJitThreshold, setKCode, setLoadPaths, setLoadServiceCreator, setNativeEnabled, setObjectSpaceEnabled, setOutput, setOutput, setProfile, setProfile, setProfileOutput, setProfilingMode, setReader, setRecordSeparator, setRunRubyInProcess, setScriptFilename, setWriter, terminate
public IsolatedScriptingContainer()
public IsolatedScriptingContainer(LocalContextScope scope, LocalVariableBehavior behavior)
public IsolatedScriptingContainer(LocalContextScope scope)
public IsolatedScriptingContainer(LocalVariableBehavior behavior)
public IsolatedScriptingContainer(LocalContextScope scope, LocalVariableBehavior behavior, boolean lazy)
public void setEnvironment(Map environment)
ScriptingContainer
setEnvironment
in interface EmbedRubyInstanceConfigAdapter
setEnvironment
in class ScriptingContainer
environment
- a new map of environment variables.public void addLoadPath(ClassLoader cl)
public void addLoadPath(ClassLoader cl, String ref)
protected void addLoadPath(String uri)
public void addGemPath(ClassLoader cl)
public void addGemPath(ClassLoader cl, String ref)
protected void addGemPath(String uri)
Copyright © 2001-2017 JRuby. All Rights Reserved.