Sha256: 023a0850436c0f6056b0559ddbda3454890dc29130c9ffb1a10e79f4f32f6c9a

Contents?: true

Size: 790 Bytes

Versions: 3

Compression:

Stored size: 790 Bytes

Contents

package com.jrjackson;

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

import java.io.IOException;

public class JrJacksonService implements BasicLibraryService {
  public boolean basicLoad(final Ruby ruby) throws IOException {
    RubyModule jr_jackson = ruby.defineModule("JrJackson");

    RubyModule jr_jackson_raw = ruby.defineModuleUnder("Raw", jr_jackson);
    jr_jackson_raw.defineAnnotatedMethods(JrJacksonRaw.class);

    RubyClass runtimeError = ruby.getRuntimeError();
    RubyClass parseError = jr_jackson.defineClassUnder("ParseError", runtimeError, runtimeError.getAllocator());
    return true;
  }
}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
jrjackson-0.2.2 src/main/java/com/jrjackson/JrJacksonService.java
jrjackson-0.2.1 src/main/java/com/jrjackson/JrJacksonService.java
jrjackson-0.2.0 src/main/java/com/jrjackson/JrJacksonService.java