class Sol::IfNode

“if” control structure. Look at this node if you want to implement other control structures like while, for, loop, etc.

Public Instance Methods

eval(context) click to toggle source
# File lib/sol/interpreter.rb, line 174
def eval(context)

        # We turn the condition node innto a Ruby value to use Ruby's "if" control structure
        if condition.eval(context).ruby_value

                body.eval(context)

        end

end