public void load(final Ruby ruby, boolean bln) {
this.ruby = ruby;
RubyModule nio = ruby.defineModule("NIO");
RubyClass selector = ruby.defineClassUnder("Selector", ruby.getObject(), new ObjectAllocator() {
public IRubyObject allocate(Ruby ruby, RubyClass rc) {
return new Selector(ruby, rc);
}
}, nio);
selector.defineAnnotatedMethods(Selector.class);
RubyClass monitor = ruby.defineClassUnder("Monitor", ruby.getObject(), new ObjectAllocator() {
public IRubyObject allocate(Ruby ruby, RubyClass rc) {
return new Monitor(ruby, rc);
}
}, nio);