class RuboCop::Cop::Layout::SpaceInsideParens

def can_be_ignored?(token1, token2)

def can_be_ignored?(token1, token2)
  return true unless parens?(token1, token2)
  # Ignore empty parentheses.
  return true if range_between(token1.begin_pos, token2.end_pos).source == '()'
  # If the second token is a comment, that means that a line break
  # follows, and that the rules for space inside don't apply.
  return true if token2.comment?
  !same_line?(token1, token2) || token1.space_after?
end