Class: Fontist::CacheCLI

Inherits:
Thor
  • Object
show all
Includes:
Fontist::CLI::ClassOptions
Defined in:
lib/fontist/cache_cli.rb

Instance Method Summary collapse

Methods included from Fontist::CLI::ClassOptions

#handle_class_options, included, #log_level

Instance Method Details

#clearObject



6
7
8
9
10
11
12
13
# File 'lib/fontist/cache_cli.rb', line 6

def clear
  handle_class_options(options)
  dir = Fontist.downloads_path
  dir.each_child(&:rmtree) if dir.exist?
  clear_indexes
  Fontist.ui.success("Cache has been successfully removed.")
  CLI::STATUS_SUCCESS
end