public class MethodBlockBody extends ContextAwareBlockBody
scope
NULL_BODY, signature, testBlockBody
Constructor and Description |
---|
MethodBlockBody(StaticScope staticScope,
Signature signature,
CacheEntry entry,
ArgumentDescriptor[] argsDesc,
IRubyObject receiver,
RubyModule originModule,
java.lang.String originName,
java.lang.String file,
int line) |
Modifier and Type | Method and Description |
---|---|
IRubyObject |
call(ThreadContext context,
Block block,
IRubyObject[] args) |
IRubyObject |
call(ThreadContext context,
Block block,
IRubyObject[] args,
Block blockArg) |
static Block |
createMethodBlock(MethodBlockBody body) |
protected IRubyObject |
doYield(ThreadContext context,
Block block,
IRubyObject value)
Subclass specific yield implementation.
|
protected IRubyObject |
doYield(ThreadContext context,
Block block,
IRubyObject[] args,
IRubyObject self)
Subclass specific yield implementation.
|
ArgumentDescriptor[] |
getArgumentDescriptors() |
java.lang.String |
getFile()
Get the filename for this block
|
int |
getLine()
get The line number for this block
|
void |
setEvalType(EvalType evalType) |
getStaticScope, post, pre, setStaticScope
arity, call, call, call, call, call, call, call, call, callDirect, canCallDirect, getEvalType, getSignature, getTestBlockBody, isGiven, prepareArgumentsForCall, testBlockBody, yield, yield, yield, yield, yieldDirect, yieldSpecific, yieldSpecific, yieldSpecific, yieldSpecific
public MethodBlockBody(StaticScope staticScope, Signature signature, CacheEntry entry, ArgumentDescriptor[] argsDesc, IRubyObject receiver, RubyModule originModule, java.lang.String originName, java.lang.String file, int line)
public static Block createMethodBlock(MethodBlockBody body)
public IRubyObject call(ThreadContext context, Block block, IRubyObject[] args)
public IRubyObject call(ThreadContext context, Block block, IRubyObject[] args, Block blockArg)
protected IRubyObject doYield(ThreadContext context, Block block, IRubyObject value)
BlockBody
Should not be called directly. Gets called by BlockBody.yield(ThreadContext, Block, org.jruby.runtime.builtin.IRubyObject)
after ensuring that any common yield logic is taken care of.
protected IRubyObject doYield(ThreadContext context, Block block, IRubyObject[] args, IRubyObject self)
BlockBody
Should not be called directly. Gets called by BlockBody.yield(ThreadContext, Block, org.jruby.runtime.builtin.IRubyObject[], org.jruby.runtime.builtin.IRubyObject)
after ensuring that all common yield logic is taken care of.
public java.lang.String getFile()
BlockBody
public int getLine()
BlockBody
public ArgumentDescriptor[] getArgumentDescriptors()
getArgumentDescriptors
in class BlockBody
public void setEvalType(EvalType evalType)
setEvalType
in class BlockBody
Copyright © 2001-2019 JRuby. All Rights Reserved.