new (Gem::Uninstaller)

    # File lib/rubygems/uninstaller.rb, line 44
      def initialize(gem, options = {})
        @gem = gem
        @version = options[:version] || Gem::Requirement.default
        gem_home = options[:install_dir] || Gem.dir
        @gem_home = File.expand_path gem_home
        @force_executables = options[:executables]
        @force_all = options[:all]
        @force_ignore = options[:ignore]
        @bin_dir = options[:bin_dir]

        # only add user directory if install_dir is not set
        @user_install = false
        @user_install = options[:user_install] unless options[:install_dir]

        spec_dir = File.join @gem_home, 'specifications'
        @source_index = Gem::SourceIndex.from_gems_in spec_dir

        if @user_install then
          user_dir = File.join Gem.user_dir, 'specifications'
          @user_index = Gem::SourceIndex.from_gems_in user_dir
        end
      end