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: gem_spec.rb
    path of file: ./repos/gem.sh/app/models
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

class GemSpec
  def self.latest_version_for(name)
    return nil if name.blank?

    Gem.latest_spec_for(name).try(:version)
  end

  def self.find(name, version = nil)
    return nil if name.nil?

    version ||= latest_version_for(name)

    return nil if version.nil?

    info = Gems::V2.info(name, version)

    return nil if info.nil?

    new(info)
  end

  def ini
    
  def metadata
    @metadata ||= YAML.load_file(
      unpack_metadata_file,
      aliases: true,
      permitted_classes: [
        Gem::Dependency,
        Gem::Requirement,
        Gem::Specification,
        Gem::Version,
        Gem::Version::Requirement, # TODO: not sure why Psych still complains about DisallowedClass for `Gem::Version::Requirement`
        Time,
        Symbol,
      ],
    )
  rescue Psych::DisallowedClass => e
    Rails.logger.debug e.inspect

    Metadata.new
  end