Examples of instance_variable_set()


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

Examples of org.jruby.RubyString.instance_variable_set()

                    iter.remove();
                }
            }
            for(Iterator iter = props.entrySet().iterator();iter.hasNext();) {
                Map.Entry em = (Map.Entry)iter.next();
                str.instance_variable_set((IRubyObject)em.getKey(),(IRubyObject)em.getValue());
            }

            return str;
        }
    }
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.