Class: Gizzard::ReloadCommand
- Defined in:
- lib/gizzard/commands.rb
Instance Attribute Summary
Attributes inherited from Command
#argv, #buffer, #command_options, #global_options, #job_injector, #manager
Instance Method Summary collapse
Methods inherited from Command
classify, #confirm!, #get_base_name, #help!, #initialize, make_job_injector, make_manager, #output, #require_tables, #require_template_options, run
Constructor Details
This class inherits a constructor from Gizzard::Command
Instance Method Details
#ask ⇒ Object
232 233 234 235 |
# File 'lib/gizzard/commands.rb', line 232 def ask output "Are you sure? Reloading will affect production services immediately! (Type 'yes')" gets.chomp == "yes" end |
#run ⇒ Object
224 225 226 227 228 229 230 |
# File 'lib/gizzard/commands.rb', line 224 def run if .force || ask manager.reload_config else STDERR.puts "aborted" end end |