Top Description Fields Constructors Methods
org.jruby.runtime

public Class MethodBlockBody

extends ContextAwareBlockBody
Class Inheritance
Imports
org.jruby.EvalType, .RubyModule, org.jruby.internal.runtime.methods.DynamicMethod, org.jruby.parser.StaticScope, org.jruby.runtime.builtin.IRubyObject, org.jruby.runtime.callsite.CacheEntry

Represents a method wrapped in a block (proc), as in Method#to_proc.

Field Summary

Modifier and TypeField and Description
private final ArgumentDescriptor[]
private final CacheEntry
private final String
private final int
private final String
private final IRubyObject
Inherited from org.jruby.runtime.ContextAwareBlockBody:
scope

Constructor Summary

AccessConstructor and Description
public
MethodBlockBody(StaticScope staticScope, Signature signature, CacheEntry entry, ArgumentDescriptor[] argsDesc, IRubyObject receiver, RubyModule originModule, String originName, String file, int line)

Method Summary

Modifier and TypeMethod and Description
public IRubyObject
public IRubyObject
call(ThreadContext context, Block block, IRubyObject[] args, Block blockArg)

Overrides org.jruby.runtime.BlockBody.call.

public static Block
protected IRubyObject
doYield(ThreadContext context, Block block, IRubyObject value)

Implements abstract org.jruby.runtime.BlockBody.doYield.

Subclass specific yield implementation.

protected IRubyObject
doYield(ThreadContext context, Block block, IRubyObject[] args, IRubyObject self)

Implements abstract org.jruby.runtime.BlockBody.doYield.

Subclass specific yield implementation.

public ArgumentDescriptor[]
public String
getFile()

Implements abstract org.jruby.runtime.BlockBody.getFile.

Get the filename for this block

public int
getLine()

Implements abstract org.jruby.runtime.BlockBody.getLine.

get The line number for this block

Inherited from org.jruby.runtime.ContextAwareBlockBody:
getStaticScopepostpresetStaticScope

Field Detail

argsDescback to summary
private final ArgumentDescriptor[] argsDesc
entryback to summary
private final CacheEntry entry
fileback to summary
private final String file
lineback to summary
private final int line
originNameback to summary
private final String originName
receiverback to summary
private final IRubyObject receiver

Constructor Detail

MethodBlockBodyback to summary
public MethodBlockBody(StaticScope staticScope, Signature signature, CacheEntry entry, ArgumentDescriptor[] argsDesc, IRubyObject receiver, RubyModule originModule, String originName, String file, int line)

Method Detail

callback to summary
public IRubyObject call(ThreadContext context, Block block, IRubyObject[] args)

Overrides org.jruby.runtime.BlockBody.call.

Annotations
@Override
callback to summary
public IRubyObject call(ThreadContext context, Block block, IRubyObject[] args, Block blockArg)

Overrides org.jruby.runtime.BlockBody.call.

Annotations
@Override
createMethodBlockback to summary
public static Block createMethodBlock(MethodBlockBody body)
doYieldback to summary
protected IRubyObject doYield(ThreadContext context, Block block, IRubyObject value)

Implements abstract org.jruby.runtime.BlockBody.doYield.

Doc from org.jruby.runtime.BlockBody.doYield.

Subclass specific yield implementation.

Should not be called directly. Gets called by yield(ThreadContext, Block, org.jruby.runtime.builtin.IRubyObject) after ensuring that any common yield logic is taken care of.

Annotations
@Override
doYieldback to summary
protected IRubyObject doYield(ThreadContext context, Block block, IRubyObject[] args, IRubyObject self)

Implements abstract org.jruby.runtime.BlockBody.doYield.

Doc from org.jruby.runtime.BlockBody.doYield.

Subclass specific yield implementation.

Should not be called directly. Gets called by yield(ThreadContext, Block, org.jruby.runtime.builtin.IRubyObject[], org.jruby.runtime.builtin.IRubyObject) after ensuring that all common yield logic is taken care of.

Annotations
@Override
getArgumentDescriptorsback to summary
public ArgumentDescriptor[] getArgumentDescriptors()

Overrides org.jruby.runtime.BlockBody.getArgumentDescriptors.

Annotations
@Override
getFileback to summary
public String getFile()

Implements abstract org.jruby.runtime.BlockBody.getFile.

Doc from org.jruby.runtime.BlockBody.getFile.

Get the filename for this block

Annotations
@Override
getLineback to summary
public int getLine()

Implements abstract org.jruby.runtime.BlockBody.getLine.

Doc from org.jruby.runtime.BlockBody.getLine.

get The line number for this block

Annotations
@Override