class Q::Syntax::Conditional
Public Instance Methods
eval(scope)
click to toggle source
# File lib/q/syntax.rb, line 34 def eval scope if condition.eval(scope) == true return consequence.eval(scope) end if has_otherwise? return otherwise.consequence.eval(scope) end false end
has_otherwise?()
click to toggle source
# File lib/q/syntax.rb, line 46 def has_otherwise? not otherwise.elements.nil? end