class RuboCop::Cop::Performance::Sum

def handle_sum_map_candidate(node)

def handle_sum_map_candidate(node)
  sum_map_candidate?(node) do |map, init|
    next if node.block_literal? || node.block_argument?
    message = build_sum_map_message(map, init)
    add_offense(sum_map_range(map, node), message: message) do |corrector|
      autocorrect_sum_map(corrector, node, map, init)
    end
  end
end