
Untitled
By: a guest on
May 25th, 2012 | syntax:
None | size: 0.47 KB | hits: 10 | expires: Never
public class John implements BasicLibraryService {
public boolean basicLoad(Ruby ruby) throws IOException {
RubyModule module = ruby.getModule("MyRubyModule");
module.defineAnnotatedMethods(JohnExtension.class);
return true;
}
}
/////////////////////////////
public class JohnExtension {
@JRubyMethod(name="my_method")
public static String myMethod(String html, String namespace) {
return "hello world";
}
}