Top Description Fields Constructors Methods
org.jruby.embed

public final Enum PathType

extends Enum<PathType>
Class Inheritance

The path type that tells from where Ruby runtime should load the specified file.
Author
Yoko Harada <[email protected]>

Field Summary

Modifier and TypeField and Description
public static final PathType
ABSOLUTE

Given filename is an absolute path.

public static final PathType
CLASSPATH

Given filename should be found from a classpath.

public static final PathType
RELATIVE

Given filename is a relative path to a base directory.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static PathType
public static PathType[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

ABSOLUTEback to summary
public static final PathType ABSOLUTE

Given filename is an absolute path.

CLASSPATHback to summary
public static final PathType CLASSPATH

Given filename should be found from a classpath.

RELATIVEback to summary
public static final PathType RELATIVE

Given filename is a relative path to a base directory. To set the base directory, use setAttribute() method of ScriptingContainer.

    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);

Constructor Detail

PathTypeback to summary
private PathType()

Method Detail

valueOfback to summary
public static PathType valueOf(String name)
valuesback to summary
public static PathType[] values()