method

clear_all

Importance_0
v2_1_10 - Show latest stable - 0 notes - Class: SourcesCommand
clear_all() public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/rubygems/commands/sources_command.rb, line 79
  def clear_all # :nodoc:
    path = Gem.spec_cache_dir
    FileUtils.rm_rf path

    unless File.exist? path then
      say "*** Removed specs cache ***"
    else
      unless File.writable? path then
        say "*** Unable to remove source cache (write protected) ***"
      else
        say "*** Unable to remove source cache ***"
      end

      terminate_interaction 1
    end
  end
Register or log in to add new notes.