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
scope
Fields 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 Block
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.getFile()
Get the filename for this blockint
getLine()
get The line number for this blockMethods inherited from class org.jruby.runtime.ContextAwareBlockBody
getStaticScope, post, pre, setStaticScope
Methods 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:BlockBody
Subclass 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:BlockBody
Subclass 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:BlockBody
Get the filename for this block -
getLine
public int getLine()Description copied from class:BlockBody
get The line number for this block -
getArgumentDescriptors
- Overrides:
getArgumentDescriptors
in classBlockBody
-