Class: Byebug::InterruptCommand
- 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, #match
Methods included from StringFunctions
Methods included from FileFunctions
#get_line, #get_lines, #n_lines, #normalize
Methods included from ParseFunctions
#get_int, #parse_steps, #syntax_valid?, #without_stderr
Constructor Details
This class inherits a constructor from Byebug::Command
Class Method Details
.description ⇒ Object
25 26 27 28 29 |
# File 'lib/byebug/commands/interrupt.rb', line 25 def description prettify <<-EOD i[nterrupt] Interrupts the program. EOD end |
.names ⇒ Object
21 22 23 |
# File 'lib/byebug/commands/interrupt.rb', line 21 def names %w(interrupt) end |
Instance Method Details
#execute ⇒ Object
15 16 17 18 |
# File 'lib/byebug/commands/interrupt.rb', line 15 def execute context = Byebug.thread_context(Thread.main) context.interrupt end |
#regexp ⇒ Object
11 12 13 |
# File 'lib/byebug/commands/interrupt.rb', line 11 def regexp /^\s*i(?:nterrupt)?\s*$/ end |