Class: Escape::Commands::Restart

Inherits:
Base
  • Object
show all
Defined in:
lib/escape/commands/restart.rb

Instance Attribute Summary

Attributes inherited from Base

#runner

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Escape::Commands::Base

Instance Method Details

#restart_or_quitObject



4
5
6
7
8
9
10
# File 'lib/escape/commands/restart.rb', line 4

def restart_or_quit
  response = runner.ask "Hit RETURN to restart or Q to quit"
  unless (response.to_s.strip.upcase == "Q")
    runner.say
    runner.execute :restart
  end
end