Add a rubocop rule to use reduce instead of each_with_index