new (Gem::Installer)

    # File lib/rubygems/installer.rb, line 59
      def initialize(gem, options={})
        @gem = gem

        options = {
          :force => false,
          :install_dir => Gem.dir,
          :exec_format => false,
        }.merge options

        @env_shebang = options[:env_shebang]
        @force = options[:force]
        gem_home = options[:install_dir]
        @gem_home = Pathname.new(gem_home).expand_path
        @ignore_dependencies = options[:ignore_dependencies]
        @format_executable = options[:format_executable]
        @security_policy = options[:security_policy]
        @wrappers = options[:wrappers]
        @skip_dependencies = options[:skip_dependencies]

        begin
          @format = Gem::Format.from_file_by_path @gem, @security_policy
        rescue Gem::Package::FormatError
          raise Gem::InstallError, "invalid gem format for #{@gem}"
        end

        @spec = @format.spec

        @gem_dir = File.join(@gem_home, "gems", @spec.full_name).untaint
      end