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
49
50
51
52
53
|
# File 'lib/ruby-debug/commands/control.rb', line 49
def help(cmd)
%{
i[nterrupt]\tinterrupt the program
}
end
|
.help_command ⇒ Object
45
46
47
|
# File 'lib/ruby-debug/commands/control.rb', line 45
def help_command
'interrupt'
end
|
Instance Method Details
#execute ⇒ Object
37
38
39
40
41
42
|
# File 'lib/ruby-debug/commands/control.rb', line 37
def execute
unless Debugger.interrupt_last
context = Debugger.contexts.find{ |c| c.thread == Thread.main }
context.interrupt
end
end
|
#regexp ⇒ Object
33
34
35
|
# File 'lib/ruby-debug/commands/control.rb', line 33
def regexp
/^\s*i(?:nterrupt)?\s*$/
end
|