Package org.jruby.embed
Interface EmbedRubyRuntimeAdapter
- All Superinterfaces:
RubyRuntimeAdapter
- All Known Implementing Classes:
EmbedRubyRuntimeAdapterImpl
Wrapper interface of
RubyRuntimeAdapter for embedding.
This interface defines Java friendly parse methods.- Author:
- Yoko Harada <[email protected]>
-
Method Summary
Modifier and TypeMethodDescriptionparse(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().Methods inherited from interface org.jruby.RubyRuntimeAdapter
eval, parse, parse
-
Method Details
-
parse
Parses a script and return an object which can be run(). This allows the script to be parsed once and evaluated many times.- 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
Parses 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.- 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
Parses 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.- 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
Parses 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.- 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
-