Class: Dabcup::Operation::Remove
- Defined in:
- lib/dabcup/operation/remove.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#best_dumps_path, #best_local_dumps_path, #check, #initialize, #remove_local_dump?, #same_ssh_as_database?, #terminate
Constructor Details
This class inherits a constructor from Dabcup::Operation::Base
Instance Method Details
#remove_from_storage(storage, name) ⇒ Object
10 11 12 |
# File 'lib/dabcup/operation/remove.rb', line 10 def remove_from_storage(storage, name) storage.delete(name) if storage.exists?(name) end |
#run(args) ⇒ Object
4 5 6 7 8 |
# File 'lib/dabcup/operation/remove.rb', line 4 def run(args) raise Dabcup::Error.new("Not enough arguments. Try 'dabcup help delete'") if args.size < 3 remove_from_storage(main_storage, args[2]) remove_from_storage(spare_storage, args[2]) end |