Sha256: d06dc8b97436ebea772e02fb9a928df204f4572086b7f6f3da49afb760603b52

Contents?: true

Size: 854 Bytes

Versions: 6

Compression:

Stored size: 854 Bytes

Contents

package com.adhearsion.ruby_speech;

import org.jruby.Ruby;
import org.jruby.RubyClass;
import org.jruby.RubyModule;
import org.jruby.RubyObject;
import org.jruby.runtime.ObjectAllocator;
import org.jruby.runtime.builtin.IRubyObject;
import org.jruby.runtime.load.BasicLibraryService;

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);
    return true;
  }
}

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ruby_speech-3.0.1-java ext/ruby_speech/RubySpeechService.java
ruby_speech-3.0.1 ext/ruby_speech/RubySpeechService.java
ruby_speech-3.0.0-java ext/ruby_speech/RubySpeechService.java
ruby_speech-3.0.0 ext/ruby_speech/RubySpeechService.java
ruby_speech-2.4.0-java ext/ruby_speech/RubySpeechService.java
ruby_speech-2.4.0 ext/ruby_speech/RubySpeechService.java