Package org.jruby.embed
Enum PathType
- All Implemented Interfaces:
Serializable,Comparable<PathType>,java.lang.constant.Constable
The path type that tells from where Ruby runtime should load the specified file.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Constructor Summary
Constructors -
Method Summary
-
Enum Constant Details
-
ABSOLUTE
Given filename is an absolute path. -
RELATIVE
Given filename is a relative path to a base directory. To set the base directory, use setAttribute() method ofScriptingContainer.ScriptingContainer container = new ScriptingContainer(); container.setAttribute(AttributeName.BASE_DIR, System.getProperty("user.dir")); String filename = "test/ruby/iteration.rb"; Object receiver = container.runScriptlet(PathType.RELATIVE, filename); -
CLASSPATH
Given filename should be found from a classpath.
-
-
Constructor Details
-
PathType
private PathType()
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-