Class: Code::Node::Code
- Inherits:
-
Code::Node
- Object
- Code::Node
- Code::Node::Code
- Defined in:
- lib/code/node/code.rb
Instance Method Summary collapse
- #evaluate(**args) ⇒ Object
-
#initialize(parsed) ⇒ Code
constructor
A new instance of Code.
- #resolve(**args) ⇒ Object
- #to_code ⇒ Object
Constructor Details
Instance Method Details
#evaluate(**args) ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/code/node/code.rb', line 13 def evaluate(**args) last = Object::Nothing.new (@statements || []).each do |statement| last = statement.evaluate(**args, object: Object::Global.new) end last end |