Package org.jruby.runtime

Examples of org.jruby.runtime.MethodBlock


    public IRubyObject parameters(ThreadContext context) {
        Ruby runtime = context.getRuntime();
        BlockBody body = this.getBlock().getBody();

        if (body instanceof MethodBlock) {
            MethodBlock methodBlock = (MethodBlock)body;
            return methodBlock.getMethod().parameters(context);
        }

        return RuntimeHelpers.parameterListToParameters(runtime, body.getParameterList(), isLambda());
    }
View Full Code Here


     */
    @JRubyMethod
    public IRubyObject to_proc(ThreadContext context, Block unusedBlock) {
        Ruby runtime = context.getRuntime();
        DynamicScope currentScope = context.getCurrentScope();
        MethodBlock mb = new MethodBlock(this, currentScope.getStaticScope()) {
            @Override
            public IRubyObject callback(IRubyObject value, IRubyObject method, IRubyObject self, Block block) {
                return bmcall(value, method, self, block);
            }
        };
View Full Code Here

     */
    @JRubyMethod
    public IRubyObject to_proc(ThreadContext context, Block unusedBlock) {
        Ruby runtime = context.runtime;
        DynamicScope currentScope = context.getCurrentScope();
        MethodBlock mb = new MethodBlock(this, currentScope.getStaticScope()) {
            @Override
            public IRubyObject callback(IRubyObject value, IRubyObject method, IRubyObject self, Block block) {
                return bmcall(value, method, self, block);
            }
        };
View Full Code Here

TOP

Related Classes of org.jruby.runtime.MethodBlock

Copyright © 2018 www.massapicom. 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.