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

commands, find, format_subcmd, format_subcmds, help, inherited, #initialize, load_commands, #match

Constructor Details

This class inherits a constructor from Byebug::Command

Class Method Details

.descriptionObject



77
78
79
# File 'lib/byebug/commands/control.rb', line 77

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

.namesObject



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

def names
  %w(interrupt)
end

Instance Method Details

#executeObject



67
68
69
70
# File 'lib/byebug/commands/control.rb', line 67

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

#regexpObject



63
64
65
# File 'lib/byebug/commands/control.rb', line 63

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