Class: Debugger::InterruptCommand
- 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
118 119 120 121 122 |
# File 'lib/ruby-debug/commands/control.rb', line 118 def help(cmd) %{ i[nterrupt]\tinterrupt the program } end |
.help_command ⇒ Object
114 115 116 |
# File 'lib/ruby-debug/commands/control.rb', line 114 def help_command 'interrupt' end |
Instance Method Details
#execute ⇒ Object
106 107 108 109 110 111 |
# File 'lib/ruby-debug/commands/control.rb', line 106 def execute unless Debugger.interrupt_last context = Debugger.thread_context(Thread.main) context.interrupt end end |
#regexp ⇒ Object
102 103 104 |
# File 'lib/ruby-debug/commands/control.rb', line 102 def regexp /^\s*i(?:nterrupt)?\s*$/ end |