org.jruby.runtime
Class Binding

java.lang.Object
  extended by org.jruby.runtime.Binding

public class Binding
extends java.lang.Object

Internal live representation of a block ({...} or do ... end).


Constructor Summary
Binding(Frame frame, RubyModule bindingClass, DynamicScope dynamicScope)
           
Binding(IRubyObject self, Frame frame, Visibility visibility, RubyModule klass, DynamicScope dynamicScope)
           
 
Method Summary
 Binding cloneBinding()
           
 DynamicScope getDynamicScope()
          Gets the dynamicVariables that are local to this block.
 Frame getFrame()
          Gets the frame.
 RubyModule getKlass()
          Gets the klass.
 IRubyObject getSelf()
           
 Visibility getVisibility()
           
 boolean isGiven()
          Is the current block a real yield'able block instead a null one
 void setSelf(IRubyObject self)
           
 void setVisibility(Visibility visibility)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Binding

public Binding(IRubyObject self,
               Frame frame,
               Visibility visibility,
               RubyModule klass,
               DynamicScope dynamicScope)

Binding

public Binding(Frame frame,
               RubyModule bindingClass,
               DynamicScope dynamicScope)
Method Detail

cloneBinding

public Binding cloneBinding()

getVisibility

public Visibility getVisibility()

setVisibility

public void setVisibility(Visibility visibility)

getSelf

public IRubyObject getSelf()

setSelf

public void setSelf(IRubyObject self)

getDynamicScope

public DynamicScope getDynamicScope()
Gets the dynamicVariables that are local to this block. Parent dynamic scopes are also accessible via the current dynamic scope.

Returns:
Returns all relevent variable scoping information

getFrame

public Frame getFrame()
Gets the frame.

Returns:
Returns a RubyFrame

getKlass

public RubyModule getKlass()
Gets the klass.

Returns:
Returns a RubyModule

isGiven

public boolean isGiven()
Is the current block a real yield'able block instead a null one

Returns:
true if this is a valid block or false otherwise


Copyright © 2002-2007 JRuby Team. All Rights Reserved.