Class: Debugger::QuitCommand
- Defined in:
- lib/ruby-debug/commands/control.rb
Overview
:nodoc:
Constant Summary
Constants inherited from Command
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Command
commands, inherited, #initialize, load_commands, #match, method_missing, options
Constructor Details
This class inherits a constructor from Debugger::Command
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Debugger::Command
Class Method Details
.help(cmd) ⇒ Object
21 22 23 24 25 26 |
# File 'lib/ruby-debug/commands/control.rb', line 21 def help(cmd) %{ q[uit]\texit from debugger, exit\talias to quit } end |
.help_command ⇒ Object
17 18 19 |
# File 'lib/ruby-debug/commands/control.rb', line 17 def help_command %w[quit exit] end |
Instance Method Details
#execute ⇒ Object
9 10 11 12 13 14 |
# File 'lib/ruby-debug/commands/control.rb', line 9 def execute if confirm("Really quit? (y/n) ") Debugger.save_history if Debugger.respond_to? :save_history exit! # exit -> exit!: No graceful way to stop threads... end end |
#regexp ⇒ Object
5 6 7 |
# File 'lib/ruby-debug/commands/control.rb', line 5 def regexp /^\s*(?:q(?:uit)?|exit)\s*$/ end |