org.jruby.runtime
Class CallBlock
java.lang.Object
org.jruby.runtime.BlockBody
org.jruby.runtime.CallBlock
- All Implemented Interfaces:
- JumpTarget
public class CallBlock
- extends BlockBody
A Block implemented using a Java-based BlockCallback implementation. For
lightweight block logic within Java code.
Method Summary |
Arity |
arity()
What is the arity of this block? |
IRubyObject |
call(ThreadContext context,
IRubyObject[] args,
Binding binding,
Block.Type type)
|
Block |
cloneBlock(Binding binding)
|
StaticScope |
getStaticScope()
|
static Block |
newCallClosure(IRubyObject self,
RubyModule imClass,
Arity arity,
BlockCallback callback,
ThreadContext context)
|
void |
setStaticScope(StaticScope newScope)
|
IRubyObject |
yield(ThreadContext context,
IRubyObject value,
Binding binding,
Block.Type type)
|
IRubyObject |
yield(ThreadContext context,
IRubyObject value,
IRubyObject self,
RubyModule klass,
boolean aValue,
Binding binding,
Block.Type type)
Yield to this block, usually passed to the current call. |
IRubyObject |
yieldSpecific(ThreadContext context,
Binding binding,
Block.Type type)
|
IRubyObject |
yieldSpecific(ThreadContext context,
IRubyObject arg0,
Binding binding,
Block.Type type)
|
IRubyObject |
yieldSpecific(ThreadContext context,
IRubyObject arg0,
IRubyObject arg1,
Binding binding,
Block.Type type)
|
IRubyObject |
yieldSpecific(ThreadContext context,
IRubyObject arg0,
IRubyObject arg1,
IRubyObject arg2,
Binding binding,
Block.Type type)
|
Methods inherited from class org.jruby.runtime.BlockBody |
asArgumentType, call, call, call, call, call, call, call, call, call, call, call, call, call, call, call, call, call, call, call, call, call, call, call, getArgumentType, getArgumentTypeWackyHack, isGiven, prepareArgumentsForCall, yieldSpecific, yieldSpecific, yieldSpecific, yieldSpecific, yieldSpecific, yieldSpecific, yieldSpecific |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
newCallClosure
public static Block newCallClosure(IRubyObject self,
RubyModule imClass,
Arity arity,
BlockCallback callback,
ThreadContext context)
call
public IRubyObject call(ThreadContext context,
IRubyObject[] args,
Binding binding,
Block.Type type)
- Overrides:
call
in class BlockBody
yieldSpecific
public IRubyObject yieldSpecific(ThreadContext context,
Binding binding,
Block.Type type)
- Overrides:
yieldSpecific
in class BlockBody
yieldSpecific
public IRubyObject yieldSpecific(ThreadContext context,
IRubyObject arg0,
Binding binding,
Block.Type type)
- Overrides:
yieldSpecific
in class BlockBody
yieldSpecific
public IRubyObject yieldSpecific(ThreadContext context,
IRubyObject arg0,
IRubyObject arg1,
Binding binding,
Block.Type type)
- Overrides:
yieldSpecific
in class BlockBody
yieldSpecific
public IRubyObject yieldSpecific(ThreadContext context,
IRubyObject arg0,
IRubyObject arg1,
IRubyObject arg2,
Binding binding,
Block.Type type)
- Overrides:
yieldSpecific
in class BlockBody
yield
public IRubyObject yield(ThreadContext context,
IRubyObject value,
Binding binding,
Block.Type type)
- Specified by:
yield
in class BlockBody
yield
public IRubyObject yield(ThreadContext context,
IRubyObject value,
IRubyObject self,
RubyModule klass,
boolean aValue,
Binding binding,
Block.Type type)
- Yield to this block, usually passed to the current call.
- Specified by:
yield
in class BlockBody
- 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:
getStaticScope
public StaticScope getStaticScope()
- Specified by:
getStaticScope
in class BlockBody
setStaticScope
public void setStaticScope(StaticScope newScope)
- Specified by:
setStaticScope
in class BlockBody
cloneBlock
public Block cloneBlock(Binding binding)
- Specified by:
cloneBlock
in class BlockBody
arity
public Arity arity()
- Description copied from class:
BlockBody
- What is the arity of this block?
- Specified by:
arity
in class BlockBody
- Returns:
- the arity
Copyright © 2002-2009 JRuby Team. All Rights Reserved.