method

clear_all

Importance_0
Ruby latest stable (v2_5_5) - 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 80
  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.