Class: Byebug::InterruptCommand
- Inherits:
-
Command
- Object
- Command
- Byebug::InterruptCommand
show all
- Defined in:
- lib/byebug/commands/interrupt.rb
Overview
Interrupting execution of current thread.
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Command
commands, find, format_subcmd, format_subcmds, help, inherited, #initialize, load_commands, #match
Class Method Details
.description ⇒ Object
23
24
25
|
# File 'lib/byebug/commands/interrupt.rb', line 23
def description
%(i|nterrupt Interrupts the program.)
end
|
.names ⇒ Object
19
20
21
|
# File 'lib/byebug/commands/interrupt.rb', line 19
def names
%w(interrupt)
end
|
Instance Method Details
#execute ⇒ Object
13
14
15
16
|
# File 'lib/byebug/commands/interrupt.rb', line 13
def execute
context = Byebug.thread_context(Thread.main)
context.interrupt
end
|
#regexp ⇒ Object
9
10
11
|
# File 'lib/byebug/commands/interrupt.rb', line 9
def regexp
/^\s*i(?:nterrupt)?\s*$/
end
|