Class: Debugger::InterruptCommand
- Inherits:
-
Command
- Object
- Command
- Debugger::InterruptCommand
show all
- Defined in:
- lib/ruby-debug/commands/control.rb
Overview
Constant Summary
Constants inherited
from Command
Command::DEF_OPTIONS
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Command
commands, inherited, #initialize, load_commands, #match, method_missing, options
Class Method Details
.help(cmd) ⇒ Object
94
95
96
97
98
|
# File 'lib/ruby-debug/commands/control.rb', line 94
def help(cmd)
%{
i[nterrupt]\tinterrupt the program
}
end
|
.help_command ⇒ Object
90
91
92
|
# File 'lib/ruby-debug/commands/control.rb', line 90
def help_command
'interrupt'
end
|
Instance Method Details
#execute ⇒ Object
82
83
84
85
86
87
|
# File 'lib/ruby-debug/commands/control.rb', line 82
def execute
unless Debugger.interrupt_last
context = Debugger.contexts.find{ |c| c.thread == Thread.main }
context.interrupt
end
end
|
#regexp ⇒ Object
78
79
80
|
# File 'lib/ruby-debug/commands/control.rb', line 78
def regexp
/^\s*i(?:nterrupt)?\s*$/
end
|