Package org.jruby.runtime
Class MethodBlockBody
java.lang.Object
org.jruby.runtime.BlockBody
org.jruby.runtime.ContextAwareBlockBody
org.jruby.runtime.MethodBlockBody
Represents a method wrapped in a block (proc), as in Method#to_proc.
-
Field Summary
Fields inherited from class org.jruby.runtime.ContextAwareBlockBody
scopeFields inherited from class org.jruby.runtime.BlockBody
NULL_BODY, signature, testBlockBody -
Constructor Summary
ConstructorsConstructorDescriptionMethodBlockBody(StaticScope staticScope, Signature signature, CacheEntry entry, ArgumentDescriptor[] argsDesc, IRubyObject receiver, RubyModule originModule, String originName, String file, int line) -
Method Summary
Modifier and TypeMethodDescriptioncall(ThreadContext context, Block block, IRubyObject[] args) call(ThreadContext context, Block block, IRubyObject[] args, Block blockArg) static Blockprotected IRubyObjectdoYield(ThreadContext context, Block block, IRubyObject value) Subclass specific yield implementation.protected IRubyObjectdoYield(ThreadContext context, Block block, IRubyObject[] args, IRubyObject self) Subclass specific yield implementation.getFile()Get the filename for this blockintgetLine()get The line number for this blockMethods inherited from class org.jruby.runtime.ContextAwareBlockBody
getStaticScope, post, pre, setStaticScopeMethods inherited from class org.jruby.runtime.BlockBody
arity, call, call, call, call, call, call, call, call, callDirect, canCallDirect, getSignature, getTestBlockBody, isGiven, isRubyBlock, prepareArgumentsForCall, testBlockBody, yield, yield, yield, yield, yieldDirect, yieldSpecific, yieldSpecific, yieldSpecific, yieldSpecific
-
Constructor Details
-
MethodBlockBody
public MethodBlockBody(StaticScope staticScope, Signature signature, CacheEntry entry, ArgumentDescriptor[] argsDesc, IRubyObject receiver, RubyModule originModule, String originName, String file, int line)
-
-
Method Details
-
createMethodBlock
-
call
-
call
-
doYield
Description copied from class:BlockBodySubclass specific yield implementation.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. -
doYield
protected IRubyObject doYield(ThreadContext context, Block block, IRubyObject[] args, IRubyObject self) Description copied from class:BlockBodySubclass specific yield implementation.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. -
getFile
Description copied from class:BlockBodyGet the filename for this block -
getLine
public int getLine()Description copied from class:BlockBodyget The line number for this block -
getArgumentDescriptors
- Overrides:
getArgumentDescriptorsin classBlockBody
-