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: components_updater.rb
    path of file: ./repos/rspec-openapi/lib/rspec/openapi
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

require_relative 'hash_helper'

class << RSpec::OpenAPI::ComponentsUpdater = Object.new
  # @param [Hash] base
  # @param [Hash] fresh
  def update!(base, fresh)
    # Top-level schema: Use
    
  def find_one_of_refs(base, paths)
    dig_schema(base, paths)&.dig('oneOf')&.map&.with_index do |schema, index|
      paths + [index] if schema&.dig('$ref')&.start_with?('#/components/schemas/')
    end&.compact
  end

  def find_object_refs(base, paths)
    [paths] if dig_schema(base, paths)&.dig('$ref')&.start_with?('#/components/schemas/')
  end
end