|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jruby.runtime.Block
public class Block
Internal live representation of a block ({...} or do ... end).
Nested Class Summary | |
---|---|
static class |
Block.Type
|
Field Summary | |
---|---|
static int |
ARRAY
|
static int |
MULTIPLE_ASSIGNMENT
|
static Block |
NULL_BLOCK
All Block variables should either refer to a real block or this NULL_BLOCK. |
static int |
SINGLE_RESTARG
|
Block.Type |
type
|
static int |
ZERO_ARGS
|
Constructor Summary | |
---|---|
protected |
Block()
|
|
Block(BlockBody body,
Binding binding)
|
Method Summary | |
---|---|
Arity |
arity()
What is the arity of this block? |
protected int |
arrayLength(IRubyObject node)
|
IRubyObject |
call(ThreadContext context,
IRubyObject[] args)
|
Block |
cloneBlock()
|
Binding |
getBinding()
|
BlockBody |
getBody()
|
Frame |
getFrame()
Gets the frame. |
RubyProc |
getProcObject()
Retrieve the proc object associated with this block |
boolean |
isGiven()
Is the current block a real yield'able block instead a null one |
void |
setProcObject(RubyProc procObject)
Set the proc object associated with this block |
IRubyObject |
yield(ThreadContext context,
IRubyObject value)
|
IRubyObject |
yield(ThreadContext context,
IRubyObject value,
IRubyObject self,
RubyModule klass,
boolean aValue)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int ZERO_ARGS
public static final int MULTIPLE_ASSIGNMENT
public static final int ARRAY
public static final int SINGLE_RESTARG
public Block.Type type
public static final Block NULL_BLOCK
Constructor Detail |
---|
protected Block()
public Block(BlockBody body, Binding binding)
Method Detail |
---|
public IRubyObject call(ThreadContext context, IRubyObject[] args)
public IRubyObject yield(ThreadContext context, IRubyObject value)
public IRubyObject yield(ThreadContext context, IRubyObject value, IRubyObject self, RubyModule klass, boolean aValue)
protected int arrayLength(IRubyObject node)
public Block cloneBlock()
public Arity arity()
public RubyProc getProcObject()
public void setProcObject(RubyProc procObject)
procObject
- public boolean isGiven()
public Binding getBinding()
public BlockBody getBody()
public Frame getFrame()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |