public class EmbedRubyRuntimeAdapterImpl extends java.lang.Object implements EmbedRubyRuntimeAdapter
| Modifier and Type | Field and Description |
|---|---|
private RubyRuntimeAdapter |
adapter |
private ScriptingContainer |
container |
| Constructor and Description |
|---|
EmbedRubyRuntimeAdapterImpl(ScriptingContainer container) |
| Modifier and Type | Method and Description |
|---|---|
IRubyObject |
eval(Ruby runtime,
java.lang.String script) |
(package private) static ManyVarsDynamicScope |
getManyVarsDynamicScope(ScriptingContainer container,
int depth) |
EmbedEvalUnit |
parse(java.io.InputStream istream,
java.lang.String filename,
int... lines)
Parses a script given by a input stream and return an object which can be run().
|
EmbedEvalUnit |
parse(PathType type,
java.lang.String filename,
int... lines)
Parses a script read from a specified path and return an object which can be run().
|
EmbedEvalUnit |
parse(java.io.Reader reader,
java.lang.String filename,
int... lines)
Parses a script given by a reader and return an object which can be run().
|
JavaEmbedUtils.EvalUnit |
parse(Ruby runtime,
java.io.InputStream istream,
java.lang.String filename,
int lineNumber) |
JavaEmbedUtils.EvalUnit |
parse(Ruby runtime,
java.lang.String script,
java.lang.String filename,
int lineNumber) |
EmbedEvalUnit |
parse(java.lang.String script,
int... lines)
Parses a script and return an object which can be run().
|
private EmbedEvalUnit |
runParser(java.lang.Object input,
java.lang.String filename,
int... lines) |
private final RubyRuntimeAdapter adapter
private final ScriptingContainer container
public EmbedRubyRuntimeAdapterImpl(ScriptingContainer container)
public EmbedEvalUnit parse(java.lang.String script, int... lines)
EmbedRubyRuntimeAdapterparse in interface EmbedRubyRuntimeAdapterscript - is a Ruby script to be parsedlines - are linenumbers to display for parse errors and backtraces.
This field is optional. Only the first argument is used for parsing.
When no line number is specified, 0 is applied to.public EmbedEvalUnit parse(java.io.Reader reader, java.lang.String filename, int... lines)
EmbedRubyRuntimeAdapterparse in interface EmbedRubyRuntimeAdapterreader - is used to read a script fromfilename - is used as in information, for example, appears in a stack trace
of an exceptionlines - are linenumbers to display for parse errors and backtraces.
This field is optional. Only the first argument is used for parsing.
When no line number is specified, 0 is applied to.public EmbedEvalUnit parse(PathType type, java.lang.String filename, int... lines)
EmbedRubyRuntimeAdapterparse in interface EmbedRubyRuntimeAdaptertype - is one of the types PathType definesfilename - is used as in information, for example, appears in a stack trace
of an exceptionlines - are linenumbers to display for parse errors and backtraces.
This field is optional. Only the first argument is used for parsing.
When no line number is specified, 0 is applied to.public EmbedEvalUnit parse(java.io.InputStream istream, java.lang.String filename, int... lines)
EmbedRubyRuntimeAdapterparse in interface EmbedRubyRuntimeAdapteristream - is an input stream to get a script fromfilename - filename is used as in information, for example, appears in a stack trace
of an exceptionlines - are linenumbers to display for parse errors and backtraces.
This field is optional. Only the first argument is used for parsing.
When no line number is specified, 0 is applied to.private EmbedEvalUnit runParser(java.lang.Object input, java.lang.String filename, int... lines)
static ManyVarsDynamicScope getManyVarsDynamicScope(ScriptingContainer container, int depth)
public IRubyObject eval(Ruby runtime, java.lang.String script)
eval in interface RubyRuntimeAdapterpublic JavaEmbedUtils.EvalUnit parse(Ruby runtime, java.lang.String script, java.lang.String filename, int lineNumber)
parse in interface RubyRuntimeAdapterpublic JavaEmbedUtils.EvalUnit parse(Ruby runtime, java.io.InputStream istream, java.lang.String filename, int lineNumber)
parse in interface RubyRuntimeAdapter