Class: Rwm::Commands::Cache

Inherits:
Object
  • Object
show all
Defined in:
lib/rwm/commands/cache.rb

Instance Method Summary collapse

Constructor Details

#initialize(argv) ⇒ Cache

Returns a new instance of Cache.



6
7
8
# File 'lib/rwm/commands/cache.rb', line 6

def initialize(argv)
  @argv = argv
end

Instance Method Details

#runObject



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/rwm/commands/cache.rb', line 10

def run
  subcommand = @argv.shift

  case subcommand
  when "clean"
    clean
  when nil
    $stderr.puts "Usage: rwm cache clean [<package>]"
    1
  else
    $stderr.puts "Unknown cache subcommand: #{subcommand}"
    $stderr.puts "Usage: rwm cache clean [<package>]"
    1
  end
end