Class: Byebug::InterruptCommand

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

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Command

command_exists?, commands, find, format_subcmd, format_subcmds, help, inherited, #initialize, load_commands, #match, register_setting_get, register_setting_set, register_setting_var, settings, settings_map, terminal_width

Constructor Details

This class inherits a constructor from Byebug::Command

Class Method Details

.descriptionObject



84
85
86
# File 'lib/byebug/commands/control.rb', line 84

def description
  %{i|nterrupt\t interrupt the program}
end

.namesObject



80
81
82
# File 'lib/byebug/commands/control.rb', line 80

def names
  %w(interrupt)
end

Instance Method Details

#executeObject



74
75
76
77
# File 'lib/byebug/commands/control.rb', line 74

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

#regexpObject



70
71
72
# File 'lib/byebug/commands/control.rb', line 70

def regexp
  /^\s*i(?:nterrupt)?\s*$/
end