class RuboCop::Cop::Performance::Sum
def handle_sum_candidate(node)
def handle_sum_candidate(node) sum_candidate?(node) do |method, init, operation| next if cop_config['OnlySumOrWithInitialValue'] && init.empty? range = sum_method_range(node) message = build_method_message(node, method, init, operation) add_offense(range, message: message) do |corrector| autocorrect(corrector, init, range) end end end