|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jruby.runtime.Block
org.jruby.runtime.MethodBlock
public class MethodBlock
Internal live representation of a block ({...} or do ... end).
| Field Summary | |
|---|---|
protected Frame |
frame
frame of method which defined this block |
boolean |
isLambda
|
| Fields inherited from class org.jruby.runtime.Block |
|---|
NULL_BLOCK |
| Constructor Summary | |
|---|---|
MethodBlock(IRubyObject self,
Frame frame,
SinglyLinkedList cref,
Visibility visibility,
RubyModule klass,
DynamicScope dynamicScope,
Callback callback,
RubyMethod method)
|
|
| Method Summary | |
|---|---|
Arity |
arity()
What is the arity of this block? |
IRubyObject |
call(ThreadContext context,
IRubyObject[] args)
|
Block |
cloneBlock()
|
static MethodBlock |
createMethodBlock(ThreadContext context,
DynamicScope dynamicScope,
Callback callback,
RubyMethod method,
IRubyObject self)
|
SinglyLinkedList |
getCRef()
|
DynamicScope |
getDynamicScope()
Gets the dynamicVariables that are local to this block. |
Frame |
getFrame()
Gets the frame. |
RubyModule |
getKlass()
Gets the klass. |
RubyProc |
getProcObject()
Retrieve the proc object associated with this block |
Visibility |
getVisibility()
|
boolean |
isGiven()
Is the current block a real yield'able block instead a null one |
protected void |
post(ThreadContext context)
|
protected void |
pre(ThreadContext context,
RubyModule klass)
|
void |
setProcObject(RubyProc procObject)
Set the proc object associated with this block |
void |
setSelf(IRubyObject self)
|
void |
setVisibility(Visibility visibility)
|
IRubyObject |
yield(ThreadContext context,
IRubyObject value)
|
IRubyObject |
yield(ThreadContext context,
IRubyObject value,
IRubyObject self,
RubyModule klass,
boolean aValue)
Yield to this block, usually passed to the current call. |
| Methods inherited from class org.jruby.runtime.Block |
|---|
createBinding, createBlock |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final Frame frame
public boolean isLambda
| Constructor Detail |
|---|
public MethodBlock(IRubyObject self,
Frame frame,
SinglyLinkedList cref,
Visibility visibility,
RubyModule klass,
DynamicScope dynamicScope,
Callback callback,
RubyMethod method)
| Method Detail |
|---|
public static MethodBlock createMethodBlock(ThreadContext context,
DynamicScope dynamicScope,
Callback callback,
RubyMethod method,
IRubyObject self)
public IRubyObject call(ThreadContext context,
IRubyObject[] args)
call in class Block
protected void pre(ThreadContext context,
RubyModule klass)
pre in class Blockprotected void post(ThreadContext context)
post in class Block
public IRubyObject yield(ThreadContext context,
IRubyObject value)
yield in class Block
public IRubyObject yield(ThreadContext context,
IRubyObject value,
IRubyObject self,
RubyModule klass,
boolean aValue)
yield in class Blockcontext - represents the current thread-specific datavalue - The value to yield, either a single value or an array of valuesself - The current selfklass - aValue - Should value be arrayified or not?
public Block cloneBlock()
cloneBlock in class Blockpublic Arity arity()
arity in class Blockpublic Visibility getVisibility()
getVisibility in class Blockpublic void setVisibility(Visibility visibility)
setVisibility in class Blockpublic void setSelf(IRubyObject self)
setSelf in class Blockpublic SinglyLinkedList getCRef()
getCRef in class Blockpublic RubyProc getProcObject()
getProcObject in class Blockpublic void setProcObject(RubyProc procObject)
setProcObject in class BlockprocObject - public DynamicScope getDynamicScope()
getDynamicScope in class Blockpublic Frame getFrame()
getFrame in class Blockpublic RubyModule getKlass()
getKlass in class Blockpublic boolean isGiven()
isGiven in class Block
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||