Package org.jruby.embed.internal
Class EmbedRubyRuntimeAdapterImpl
java.lang.Object
org.jruby.embed.internal.EmbedRubyRuntimeAdapterImpl
- All Implemented Interfaces:
EmbedRubyRuntimeAdapter,RubyRuntimeAdapter
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final RubyRuntimeAdapterprivate final ScriptingContainerprivate final boolean -
Constructor Summary
ConstructorsConstructorDescriptionEmbedRubyRuntimeAdapterImpl(ScriptingContainer container) EmbedRubyRuntimeAdapterImpl(ScriptingContainer container, boolean wrapExceptions) -
Method Summary
Modifier and TypeMethodDescription(package private) static DynamicScopecreateLocalVarScope(Ruby runtime, String[] varNames) parse(InputStream istream, String filename, int... lines) Parses a script given by a input stream and return an object which can be run().Parses a script given by a reader and return an object which can be run().Parses a script and return an object which can be run().Parses a script read from a specified path and return an object which can be run().parse(Ruby runtime, InputStream istream, String filename, int lineNumber) private EmbedEvalUnit
-
Field Details
-
adapter
-
container
-
wrapExceptions
private final boolean wrapExceptions
-
-
Constructor Details
-
EmbedRubyRuntimeAdapterImpl
-
EmbedRubyRuntimeAdapterImpl
-
-
Method Details
-
parse
Description copied from interface:EmbedRubyRuntimeAdapterParses a script and return an object which can be run(). This allows the script to be parsed once and evaluated many times.- Specified by:
parsein interfaceEmbedRubyRuntimeAdapter- Parameters:
script- 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.- Returns:
- an object which can be run
-
parse
Description copied from interface:EmbedRubyRuntimeAdapterParses a script given by a reader and return an object which can be run(). This allows the script to be parsed once and evaluated many times.- Specified by:
parsein interfaceEmbedRubyRuntimeAdapter- Parameters:
reader- 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.- Returns:
- an object which can be run
-
parse
Description copied from interface:EmbedRubyRuntimeAdapterParses a script read from a specified path and return an object which can be run(). This allows the script to be parsed once and evaluated many times.- Specified by:
parsein interfaceEmbedRubyRuntimeAdapter- Parameters:
type- is one of the typesPathTypedefinesfilename- 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.- Returns:
- an object which can be run
-
parse
Description copied from interface:EmbedRubyRuntimeAdapterParses a script given by a input stream and return an object which can be run(). This allows the script to be parsed once and evaluated many times.- Specified by:
parsein interfaceEmbedRubyRuntimeAdapter- Parameters:
istream- 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.- Returns:
- an object which can be run
-
runParser
-
eval
- Specified by:
evalin interfaceRubyRuntimeAdapter
-
parse
- Specified by:
parsein interfaceRubyRuntimeAdapter
-
parse
public JavaEmbedUtils.EvalUnit parse(Ruby runtime, InputStream istream, String filename, int lineNumber) - Specified by:
parsein interfaceRubyRuntimeAdapter
-
createLocalVarScope
-