Open ananace opened 7 years ago
All the methods need to get some better - and more descriptive - input fields instead.
For instance, perhaps Server could have its power off method split into multiples;
Server
def turn_off requires :name, :computer_name service.stop_vm name: name, computer_name: computer_name, turn_off: true end def stop(force = false) requires :name, :computer_name service.stop_vm name: name, computer_name: computer_name, force: force end
Or just simplifying down slightly;
def stop(method = nil) requires :name, :computer_name args = { name: name, computer_name: computer_name } args[method] = true if [:force, :turn_off].include? method service.stop_vm args end
All the methods need to get some better - and more descriptive - input fields instead.
For instance, perhaps
Server
could have its power off method split into multiples;Or just simplifying down slightly;