Class: Tebako::CacheCli

Inherits:
Thor
  • Object
show all
Defined in:
lib/tebako/cli.rb

Overview

'tebako cache' subcommands: machine-wide prebuilt runtime package cache

Instance Method Summary collapse

Instance Method Details

#listObject



55
56
57
58
59
60
61
# File 'lib/tebako/cli.rb', line 55

def list
  entries = runtime_manager.entries
  return puts empty_message if entries.empty?

  entries.each { |entry| puts entry_line(entry) }
  puts total_line(entries)
end

#pruneObject



67
68
69
70
71
72
73
# File 'lib/tebako/cli.rb', line 67

def prune
  removed = do_prune
  return if removed.nil?

  removed.each { |name| puts "Removed #{name}" }
  puts "#{removed.size} cached runtime package(s) removed"
end