Package com.jrjackson

Source Code of com.jrjackson.JrJacksonService

package com.jrjackson;

import org.jruby.Ruby;
import org.jruby.RubyModule;
import org.jruby.RubyClass;
import org.jruby.runtime.load.BasicLibraryService;

import java.io.IOException;

public class JrJacksonService implements BasicLibraryService {

    @Override
    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;
    }
}
TOP

Related Classes of com.jrjackson.JrJacksonService

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.