Class: Byebug::InterruptCommand

Inherits:
Command
  • Object
show all
Defined in:
lib/byebug/commands/interrupt.rb

Overview

Interrupting execution of current thread.

Instance Attribute Summary

Attributes inherited from Command

#processor

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Command

#arguments, columnize, #context, #frame, help, #initialize, match, to_s

Methods included from Helpers::StringHelper

#camelize, #prettify

Constructor Details

This class inherits a constructor from Byebug::Command

Class Method Details

.descriptionObject



14
15
16
17
18
19
20
# File 'lib/byebug/commands/interrupt.rb', line 14

def self.description
  <<-EOD
    int[errupt]

    #{short_description}
  EOD
end

.regexpObject



10
11
12
# File 'lib/byebug/commands/interrupt.rb', line 10

def self.regexp
  /^\s*int(?:errupt)?\s*$/
end

.short_descriptionObject



22
23
24
# File 'lib/byebug/commands/interrupt.rb', line 22

def self.short_description
  'Interrupts the program'
end

Instance Method Details

#executeObject



26
27
28
# File 'lib/byebug/commands/interrupt.rb', line 26

def execute
  Byebug.thread_context(Thread.main).interrupt
end