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: minable.rb
    path of file: ./repos/mongoid/lib/mongoid/persistable
    
    the code of the file until where you have to start completion: # frozen_string_literal: true
# rubocop:todo all

module Mongoid
  m
    
      def set_min(fields)
        prepare_atomic_operation do |ops|
          process_atomic_operations(fields) do |field, value|
            current_value = attributes[field]
            if value < current_value
              process_attribute field, value
              ops[atomic_attribute_name(field)] = value
            end
          end
          { "$min" => ops } unless ops.empty?
        end