Package org.jruby

Examples of org.jruby.RubyModule.instance_variable_set()


    public static IRubyObject included(ThreadContext context, IRubyObject klazz, IRubyObject arg) {
        Ruby runtime = context.getRuntime();
        if (arg instanceof RubyModule) {
            RubyModule base = (RubyModule)arg;
            bases.add(base);
            base.instance_variable_set(RubyString.newString(context.getRuntime(), "@peer"), runtime.getTrue());
            IRubyObject common = runtime.getClassFromPath("Diametric::Persistence::Common");
            base.send(context, RubySymbol.newSymbol(runtime, "include"), common, Block.NULL_BLOCK);
            IRubyObject classmethods = runtime.getClassFromPath("Diametric::Persistence::Peer::ClassMethods");
            base.send(context, RubySymbol.newSymbol(runtime, "extend"), classmethods, Block.NULL_BLOCK);
        }
View Full Code Here

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.