Method: Gem::Commands::UninstallCommand#execute

Defined in:
lib/rubygems/commands/uninstall_command.rb

#executeObject



125
126
127
128
129
130
131
132
133
134
135
136
137
138
# File 'lib/rubygems/commands/uninstall_command.rb', line 125

def execute
  check_version

  # Consider only gem specifications installed at `--install-dir`
  Gem::Specification.dirs = options[:install_dir] if options[:install_dir]

  if options[:all] && !options[:args].empty?
    uninstall_specific
  elsif options[:all]
    uninstall_all
  else
    uninstall_specific
  end
end