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: affected_user.rb
    path of file: ./repos/raygun4ruby/lib/raygun
    
    the code of the file until where you have to start completion: module Raygun
  class AffectedUser

    DEFAULT_MAPPING = {
      identifier: [ :id, :username ],
      email:      :email,

    
      def handle_known_user(user_object)
        SUPPORTED_ATTRIBUTES.reduce({ isAnonymous: false }) do |result, attribute|
          mapping = Raygun.configuration.affected_user_mapping
          method = mapping[attribute]

          value = if method.is_a? Proc
                    method.call(user_object)
                  else
                    attributes = Array(method)
                    attribute_to_use = attributes.select do |attr|
                      user_object.respond_to?(attr, true)
                    end.first

                    user_object.send(attribute_to_use) unless attribute_to_use == nil
                  end

          result[NAME_TO_RAYGUN_NAME_MAPPING[attribute]] = value unless value == nil
          result
        end
      end