Examples of RubyProc


Examples of org.jruby.RubyProc

    @Override
    public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, Block block) {
        if (block.isGiven()) {
            JavaProxy proxy = castJavaProxy(self);

            RubyProc proc = RubyProc.newProc(context.runtime, block, block.type);
            JavaConstructor constructor = (JavaConstructor)findCallableArityTwo(self, name, arg0, proc);
            Object cArg0 = convertArg(arg0, constructor, 0);
            Object cArg1 = convertArg(proc, constructor, 1);

            proxy.setObject(constructor.newInstanceDirect(cArg0, cArg1));
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.