Class: SpotFeel::IfExpression
- Defined in:
- lib/spot_feel/nodes.rb
Overview
-
if expression = “if” , expression , “then” , expression , “else” expression ;
Instance Method Summary collapse
Methods inherited from Node
#qualified_names_in_context, #raise_evaluation_error
Instance Method Details
#eval(context = {}) ⇒ Object
435 436 437 438 439 440 441 |
# File 'lib/spot_feel/nodes.rb', line 435 def eval(context = {}) if condition.eval(context) true_case.eval(context) else false_case.eval(context) end end |