Class: Code::Node::Call

Inherits:
Object
  • Object
show all
Defined in:
lib/code/node/call.rb

Instance Method Summary collapse

Constructor Details

#initialize(call) ⇒ Call

Returns a new instance of Call.



4
5
6
7
# File 'lib/code/node/call.rb', line 4

def initialize(call)
  @left = ::Code::Node::Statement.new(call.fetch(:left))
  @right = ::Code::Node::Statement.new(call.fetch(:right))
end

Instance Method Details

#evaluate(context) ⇒ Object



9
10
11
12
# File 'lib/code/node/call.rb', line 9

def evaluate(context)
  context = left.evaluate(context)
  right.evaluate(context)
end