org.jruby.runtime
Class CallBlock
java.lang.Object
org.jruby.runtime.Block
org.jruby.runtime.CallBlock
public class CallBlock
- extends Block
A Block implemented using a Java-based BlockCallback implementation
rather than with an ICallable. For lightweight block logic within
Java code.
Methods inherited from class org.jruby.runtime.Block |
createBinding, createBlock, getCRef, getDynamicScope, getFrame, getKlass, getProcObject, getVisibility, isGiven, post, pre, setProcObject, setSelf, setVisibility |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CallBlock
public CallBlock(IRubyObject self,
RubyModule imClass,
Arity arity,
BlockCallback callback,
ThreadContext ctx)
call
public IRubyObject call(ThreadContext context,
IRubyObject[] args)
- Overrides:
call
in class Block
yield
public IRubyObject yield(ThreadContext context,
IRubyObject value)
- Overrides:
yield
in class Block
yield
public IRubyObject yield(ThreadContext context,
IRubyObject value,
IRubyObject self,
RubyModule klass,
boolean aValue)
- Yield to this block, usually passed to the current call.
- Overrides:
yield
in class Block
- Parameters:
context
- 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?
- Returns:
cloneBlock
public Block cloneBlock()
- Overrides:
cloneBlock
in class Block
arity
public Arity arity()
- Description copied from class:
Block
- What is the arity of this block?
- Overrides:
arity
in class Block
- Returns:
- the arity
Copyright © 2002-2007 JRuby Team. All Rights Reserved.