class UnaryExpr

A boolean expression with one child

Public Instance Methods

truthy?(context) click to toggle source
# File lib/emerald/nodes/unary_expr.rb, line 9
def truthy?(context)
  if negated.text_value.length.positive?
    !elements[1].val.truthy?(context)
  else
    elements[1].val.truthy?(context)
  end
end