org.jruby.runtime
Class CompiledBlock
java.lang.Object
org.jruby.runtime.Block
org.jruby.runtime.CompiledBlock
public class CompiledBlock
- 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, setProcObject, setSelf, setVisibility, yield |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CompiledBlock
public CompiledBlock(ThreadContext context,
IRubyObject self,
Arity arity,
DynamicScope dynamicScope,
CompiledBlockCallback callback)
pre
protected void pre(ThreadContext context,
RubyModule klass)
- Overrides:
pre
in class Block
post
protected void post(ThreadContext context)
- Overrides:
post
in class Block
call
public IRubyObject call(ThreadContext context,
IRubyObject[] args)
- Overrides:
call
in class Block
yield
public IRubyObject yield(ThreadContext context,
IRubyObject args,
IRubyObject self,
RubyModule klass,
boolean aValue)
- Description copied from class:
Block
- Yield to this block, usually passed to the current call.
- Overrides:
yield
in class Block
- Parameters:
context
- represents the current thread-specific dataargs
- The value to yield, either a single value or an array of valuesself
- The current selfaValue
- 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.