module RuboCop::AST::BinaryOperatorNode

def conditions

Returns:
  • (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

def lhs

Returns:
  • (Node) - the left hand side of the binary operation
def lhs
  node_parts[0]
end

def rhs

Returns:
  • (Node) - the right hand side of the binary operation
def rhs
  node_parts[1]
end