public class EmbedRubyRuntimeAdapterImpl extends Object implements EmbedRubyRuntimeAdapter
Constructor and Description |
---|
EmbedRubyRuntimeAdapterImpl(ScriptingContainer container) |
Modifier and Type | Method and Description |
---|---|
IRubyObject |
eval(Ruby runtime,
String script) |
EmbedEvalUnit |
parse(InputStream istream,
String filename,
int... lines)
Parses a script given by a input stream and return an object which can be run().
|
EmbedEvalUnit |
parse(PathType type,
String filename,
int... lines)
Parses a script read from a specified path and return an object which can be run().
|
EmbedEvalUnit |
parse(Reader reader,
String filename,
int... lines)
Parses a script given by a reader and return an object which can be run().
|
JavaEmbedUtils.EvalUnit |
parse(Ruby runtime,
InputStream istream,
String filename,
int lineNumber) |
JavaEmbedUtils.EvalUnit |
parse(Ruby runtime,
String script,
String filename,
int lineNumber) |
EmbedEvalUnit |
parse(String script,
int... lines)
Parses a script and return an object which can be run().
|
public EmbedRubyRuntimeAdapterImpl(ScriptingContainer container)
public EmbedEvalUnit parse(String script, int... lines)
EmbedRubyRuntimeAdapter
parse
in interface EmbedRubyRuntimeAdapter
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.public EmbedEvalUnit parse(Reader reader, String filename, int... lines)
EmbedRubyRuntimeAdapter
parse
in interface EmbedRubyRuntimeAdapter
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.public EmbedEvalUnit parse(PathType type, String filename, int... lines)
EmbedRubyRuntimeAdapter
parse
in interface EmbedRubyRuntimeAdapter
type
- 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(InputStream istream, String filename, int... lines)
EmbedRubyRuntimeAdapter
parse
in interface EmbedRubyRuntimeAdapter
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.public IRubyObject eval(Ruby runtime, String script)
eval
in interface RubyRuntimeAdapter
public JavaEmbedUtils.EvalUnit parse(Ruby runtime, String script, String filename, int lineNumber)
parse
in interface RubyRuntimeAdapter
public JavaEmbedUtils.EvalUnit parse(Ruby runtime, InputStream istream, String filename, int lineNumber)
parse
in interface RubyRuntimeAdapter
Copyright © 2001-2013 JRuby. All Rights Reserved.