| java.lang.Object org.jruby.runtime.Block
All known Subclasses: org.jruby.runtime.MethodBlock, org.jruby.runtime.SharedScopeBlock, org.jruby.runtime.CallBlock, org.jruby.runtime.CompiledBlock,
Block | public class Block (Code) | | Internal live representation of a block ({...} or do ... end).
|
Method Summary | |
public Arity | arity() | public IRubyObject | call(ThreadContext context, IRubyObject[] args) | public Block | cloneBlock() | public static Block | createBinding(Frame frame, DynamicScope dynamicScope) | public static Block | createBlock(ThreadContext context, IterNode iterNode, DynamicScope dynamicScope, IRubyObject self) | public SinglyLinkedList | getCRef() | public DynamicScope | getDynamicScope() Gets the dynamicVariables that are local to this block. | public Frame | getFrame() Gets the frame. | public RubyModule | getKlass() Gets the klass. | public RubyProc | getProcObject() | public Visibility | getVisibility() | public boolean | isGiven() | protected void | post(ThreadContext context) | protected void | pre(ThreadContext context, RubyModule klass) | public void | setProcObject(RubyProc procObject) | public void | setSelf(IRubyObject self) | public void | setVisibility(Visibility visibility) | public IRubyObject | yield(ThreadContext context, IRubyObject value) | public IRubyObject | yield(ThreadContext context, IRubyObject value, IRubyObject self, RubyModule klass, boolean aValue) Yield to this block, usually passed to the current call. |
NULL_BLOCK | final public static Block NULL_BLOCK(Code) | | All Block variables should either refer to a real block or this NULL_BLOCK.
|
dynamicScope | protected DynamicScope dynamicScope(Code) | | A reference to all variable values (and names) that are in-scope for this block.
|
frame | protected Frame frame(Code) | | frame of method which defined this block
|
isLambda | public boolean isLambda(Code) | | |
arity | public Arity arity()(Code) | | What is the arity of this block?
the arity |
getDynamicScope | public DynamicScope getDynamicScope()(Code) | | Gets the dynamicVariables that are local to this block. Parent dynamic scopes are also
accessible via the current dynamic scope.
Returns all relevent variable scoping information |
getFrame | public Frame getFrame()(Code) | | Gets the frame.
Returns a RubyFrame |
getProcObject | public RubyProc getProcObject()(Code) | | Retrieve the proc object associated with this block
the proc or null if this has no proc associated with it |
isGiven | public boolean isGiven()(Code) | | Is the current block a real yield'able block instead a null one
true if this is a valid block or false otherwise |
setProcObject | public void setProcObject(RubyProc procObject)(Code) | | Set the proc object associated with this block
Parameters: procObject - |
yield | public IRubyObject yield(ThreadContext context, IRubyObject value, IRubyObject self, RubyModule klass, boolean aValue)(Code) | | Yield to this block, usually passed to the current call.
Parameters: context - represents the current thread-specific data Parameters: value - The value to yield, either a single value or an array of values Parameters: self - The current self Parameters: klass - Parameters: aValue - Should value be arrayified or not? |
|
|