Class: Apricot::Scope
Direct Known Subclasses
Instance Attribute Summary collapse
-
#loop_label ⇒ Object
The loop label stores the code location where a (recur) form should jump to.
-
#parent ⇒ Object
readonly
Returns the value of attribute parent.
-
#variables ⇒ Object
readonly
Returns the value of attribute variables.
Instance Method Summary collapse
-
#initialize(parent) ⇒ Scope
constructor
A new instance of Scope.
Constructor Details
#initialize(parent) ⇒ Scope
Returns a new instance of Scope.
52 53 54 55 56 |
# File 'lib/apricot/scopes.rb', line 52 def initialize(parent) @parent = parent @variables = {} @loop_label = nil end |
Instance Attribute Details
#loop_label ⇒ Object
The loop label stores the code location where a (recur) form should jump to.
50 51 52 |
# File 'lib/apricot/scopes.rb', line 50 def loop_label @loop_label end |
#parent ⇒ Object (readonly)
Returns the value of attribute parent.
47 48 49 |
# File 'lib/apricot/scopes.rb', line 47 def parent @parent end |
#variables ⇒ Object (readonly)
Returns the value of attribute variables.
47 48 49 |
# File 'lib/apricot/scopes.rb', line 47 def variables @variables end |