Class: Awshucks::ResetMetadataCacheCommand
- Defined in:
- lib/awshucks/commands/reset_metadata_cache.rb
Instance Method Summary collapse
Methods inherited from Command
commands, execute, inherited, #option_parser, option_string, parse_and_execute
Instance Method Details
#execute(args, config) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/awshucks/commands/reset_metadata_cache.rb', line 10 def execute(args, config) @config = config list = [] if args.empty? list += config.backups else list << config.backup(args.first) end list.each {|b| reset(b) } rescue UnknownBackupError $stderr.puts "Unknown backup: #{args.first}" end |