public class RubySpeechService implements BasicLibraryService {
public boolean basicLoad(Ruby ruby) {
RubyModule ruby_speech = ruby.defineModule("RubySpeech");
RubyModule grxml = ruby_speech.defineModuleUnder("GRXML");
RubyClass matcher = grxml.defineClassUnder("Matcher", ruby.getObject(), new ObjectAllocator() {
public IRubyObject allocate(Ruby runtime, RubyClass rubyClass) {
return new RubySpeechGRXMLMatcher(runtime, rubyClass);
}
});
matcher.defineAnnotatedMethods(RubySpeechGRXMLMatcher.class);