public abstract class MethodBlock extends ContextAwareBlockBody
scope, signature
argumentType, ARRAY, EMPTY_PARAMETER_LIST, MULTIPLE_ASSIGNMENT, NULL_BODY, SINGLE_RESTARG, ZERO_ARGS
Constructor and Description |
---|
MethodBlock(RubyMethod method,
StaticScope staticScope) |
arity, getSignature, getStaticScope, setStaticScope
asArgumentType, call, call, call, call, call, call, call, call, getArgumentType, getArgumentTypeWackyHack, getParameterList, isGiven, prepareArgumentsForCall, setEvalType, yield, yield
public MethodBlock(RubyMethod method, StaticScope staticScope)
public static Block createMethodBlock(ThreadContext context, IRubyObject self, DynamicScope dynamicScope, MethodBlock body)
public abstract IRubyObject callback(IRubyObject value, IRubyObject method, IRubyObject self, Block block)
public IRubyObject call(ThreadContext context, IRubyObject[] args, Binding binding, Block.Type type)
public IRubyObject call(ThreadContext context, IRubyObject[] args, Binding binding, Block.Type type, Block block)
protected Frame pre(ThreadContext context, Binding binding)
pre
in class ContextAwareBlockBody
protected void post(ThreadContext context, Binding binding, Visibility visibility, Frame lastFrame)
post
in class ContextAwareBlockBody
public IRubyObject yieldSpecific(ThreadContext context, Binding binding, Block.Type type)
yieldSpecific
in class BlockBody
public IRubyObject yieldSpecific(ThreadContext context, IRubyObject arg0, Binding binding, Block.Type type)
yieldSpecific
in class BlockBody
public IRubyObject yieldSpecific(ThreadContext context, IRubyObject arg0, IRubyObject arg1, Binding binding, Block.Type type)
yieldSpecific
in class BlockBody
public IRubyObject yieldSpecific(ThreadContext context, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Binding binding, Block.Type type)
yieldSpecific
in class BlockBody
protected IRubyObject doYield(ThreadContext context, IRubyObject value, Binding binding, Block.Type type)
BlockBody
Should not be called directly. Gets called by BlockBody.yield(ThreadContext, IRubyObject, Binding, Block.Type)
after ensuring that any common yield logic is taken care of.
public IRubyObject yield(ThreadContext context, IRubyObject value, Binding binding, Block.Type type, Block block)
protected IRubyObject doYield(ThreadContext context, IRubyObject[] args, IRubyObject self, Binding binding, Block.Type type)
BlockBody
Should not be called directly. Gets called by BlockBody.yield(ThreadContext, org.jruby.runtime.builtin.IRubyObject[], org.jruby.runtime.builtin.IRubyObject, Binding, org.jruby.runtime.Block.Type)
after ensuring that all common yield logic is taken care of.
protected IRubyObject prepareSelf(Binding binding)
public IRubyObject yield(ThreadContext context, IRubyObject[] args, IRubyObject self, Binding binding, Block.Type type, Block block)
public String getFile()
BlockBody
public int getLine()
BlockBody
public RubyMethod getMethod()
Copyright © 2001-2015 JRuby. All Rights Reserved.