Class: IfNode

Inherits:
ControlflowNode show all
Defined in:
lib/nodes.rb

Instance Method Summary collapse

Methods inherited from ControlflowNode

#initialize

Constructor Details

This class inherits a constructor from ControlflowNode

Instance Method Details

#evaluate(scope) ⇒ Object



253
254
255
256
257
# File 'lib/nodes.rb', line 253

def evaluate(scope)
  if @expression.evaluate(scope)
    @block.evaluate(scope)
  end
end