Class: Context
- Inherits:
-
Object
- Object
- Context
- Defined in:
- lib/turmali/runtime/context.rb
Instance Attribute Summary collapse
-
#current_class ⇒ Object
readonly
Returns the value of attribute current_class.
-
#current_self ⇒ Object
readonly
Returns the value of attribute current_self.
-
#locals ⇒ Object
readonly
Returns the value of attribute locals.
Instance Method Summary collapse
-
#initialize(current_self, current_class = current_self.runtime_class) ⇒ Context
constructor
A new instance of Context.
Constructor Details
#initialize(current_self, current_class = current_self.runtime_class) ⇒ Context
Returns a new instance of Context.
4 5 6 7 8 |
# File 'lib/turmali/runtime/context.rb', line 4 def initialize(current_self, current_class=current_self.runtime_class) @locals = {} @current_self = current_self @current_class = current_class end |
Instance Attribute Details
#current_class ⇒ Object (readonly)
Returns the value of attribute current_class.
2 3 4 |
# File 'lib/turmali/runtime/context.rb', line 2 def current_class @current_class end |
#current_self ⇒ Object (readonly)
Returns the value of attribute current_self.
2 3 4 |
# File 'lib/turmali/runtime/context.rb', line 2 def current_self @current_self end |
#locals ⇒ Object (readonly)
Returns the value of attribute locals.
2 3 4 |
# File 'lib/turmali/runtime/context.rb', line 2 def locals @locals end |