method
new
v2_5_5 -
Show latest stable
- Class:
Gem::Uninstaller
new(gem, options = {})public
Constructs an uninstaller that will uninstall gem
# File lib/rubygems/uninstaller.rb, line 45
def initialize(gem, options = {})
# TODO document the valid options
@gem = gem
@version = options[:version] || Gem::Requirement.default
@gem_home = File.expand_path(options[:install_dir] || Gem.dir)
@force_executables = options[:executables]
@force_all = options[:all]
@force_ignore = options[:ignore]
@bin_dir = options[:bin_dir]
@format_executable = options[:format_executable]
@abort_on_dependent = options[:abort_on_dependent]
# Indicate if development dependencies should be checked when
# uninstalling. (default: false)
#
@check_dev = options[:check_dev]
if options[:force]
@force_all = true
@force_ignore = true
end
# only add user directory if install_dir is not set
@user_install = false
@user_install = options[:user_install] unless options[:install_dir]
end Related methods
- Instance methods
- abort_on_dependent?
- ask_if_ok
- dependencies_ok?
- formatted_program_filename
- path_ok?
- remove
- remove_all
- remove_executables
- uninstall
- uninstall_gem
- Class methods
- new