module RuboCop::AST::BinaryOperatorNode
def conditions
-
(Array
- the left and right hand side of the binary)
def conditions lhs, rhs = *self lhs = lhs.children.first if lhs.begin_type? rhs = rhs.children.first if rhs.begin_type? [lhs, rhs].each_with_object([]) do |side, collection| if side.operator_keyword? collection.concat(side.conditions) else collection << side end end end