Class: Confuscript::Nodes::InitializationNode
- Inherits:
-
BaseNode
- Object
- Treetop::Runtime::SyntaxNode
- BaseNode
- Confuscript::Nodes::InitializationNode
- Defined in:
- lib/confuscript/nodes/initialization_node.rb
Instance Method Summary collapse
Methods inherited from BaseNode
Instance Method Details
#evaluate(context) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/confuscript/nodes/initialization_node.rb', line 4 def evaluate(context) variable_name = variable.text_value # Here's the basic idea: we initialize the variable with a default value or simply declare it. # For now, we'll set the default value to nil. context[variable_name] = nil # Return the variable name for potential further processing or return nil # Will need some thought on this one. variable_name end |