Class: Sol::SetConstantNode
- Inherits:
-
Struct
- Object
- Struct
- Sol::SetConstantNode
- Defined in:
- lib/sol/nodes.rb,
lib/sol/interpreter.rb
Overview
Setting the value of a constant.
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name
67 68 69 |
# File 'lib/sol/nodes.rb', line 67 def name @name end |
#value ⇒ Object
Returns the value of attribute value
67 68 69 |
# File 'lib/sol/nodes.rb', line 67 def value @value end |
Instance Method Details
#eval(context) ⇒ Object
141 142 143 144 145 |
# File 'lib/sol/interpreter.rb', line 141 def eval(context) context[name] = value.eval(context) end |