class BinaryExpr
A boolean expression with two children and an operator
Public Instance Methods
truthy?(context)
click to toggle source
# File lib/emerald/nodes/binary_expr.rb, line 9 def truthy?(context) case op.text_value when 'and' lhs.truthy?(context) && rhs.truthy?(context) when 'or' lhs.truthy?(context) || rhs.truthy?(context) end end