| Method from org.jruby.RubyClassPathVariable Detail: |
public IRubyObject append(IRubyObject obj) throws Exception {
String ss = obj.convertToString().toString();
URL url = getURL(ss);
getRuntime().getJRubyClassLoader().addURL(url);
return this;
}
|
public static void createClassPathVariable(Ruby runtime) {
RubyClassPathVariable self = new RubyClassPathVariable(runtime);
runtime.getEnumerable().extend_object(self);
runtime.defineReadonlyVariable("$CLASSPATH", self);
self.getMetaClass().defineAnnotatedMethods(RubyClassPathVariable.class);
}
|
public IRubyObject each(Block block) {
URL[] urls = getRuntime().getJRubyClassLoader().getURLs();
ThreadContext ctx = getRuntime().getCurrentContext();
for(int i=0,j=urls.length;i< j;i++) {
block.yield(ctx, getRuntime().newString(urls[i].toString()));
}
return getRuntime().getNil();
}
|
public IRubyObject inspect() {
return callMethod(getRuntime().getCurrentContext(), "to_a").callMethod(getRuntime().getCurrentContext(), "inspect");
}
|
public IRubyObject size() {
return getRuntime().newFixnum(getRuntime().getJRubyClassLoader().getURLs().length);
}
|
public IRubyObject to_s() {
return callMethod(getRuntime().getCurrentContext(), "to_a").callMethod(getRuntime().getCurrentContext(), "to_s");
}
|