You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: rating.rb
    path of file: ./repos/rgsoc-teams/app/models
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

class Rating < ApplicationRecord
  FIELDS = ActiveSupport::HashWithIndifferentAccess.new({
    diversity:
      RatingCriterium.new(0.05, {
             
    
  def set_data
    new_data = ActiveSupport::HashWithIndifferentAccess.new
    FIELDS.keys.each do |name|
      points = send(name)
      new_data = new_data.merge({ name => points })
    end

    self.data = new_data
  end