Class: Guignol::Commands::Stop
- Inherits:
-
Base
- Object
- Base
- Guignol::Commands::Stop
show all
- Defined in:
- lib/guignol/commands/stop.rb
Instance Method Summary
collapse
Methods inherited from Base
#initialize, #run
Instance Method Details
#before_run(configs, options = {}) ⇒ Object
19
20
21
22
23
24
|
# File 'lib/guignol/commands/stop.rb', line 19
def before_run(configs, options = {})
return true if configs.empty?
return true if options[:force]
names = configs.keys.join(", ")
shell.yes? "Are you sure you want to stop servers #{names}? [y/N]", :cyan
end
|
#run_on_server(instance, options = {}) ⇒ Object
26
27
28
|
# File 'lib/guignol/commands/stop.rb', line 26
def run_on_server(instance, options = {})
instance.stop
end
|