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: cross_reference.rb
    path of file: ./repos/ruby-packer/ruby/lib/rdoc
    
    the code of the file until where you have to start completion: # frozen_string_literal: true
##
# RDoc::CrossReference is a reusable wa
    
  def resolve name, text
    return @seen[name] if @seen.include? name

    if /#{CLASS_REGEXP_STR}([.#]|::)#{METHOD_REGEXP_STR}/o =~ name then
      type = $2
      if '.' == type # will find either #method or ::method
        method = $3
      else
        method = "#{type}#{$3}"
      end