Class: Byebug::ThreadStopCommand

Inherits:
Command
  • Object
show all
Defined in:
lib/byebug/commands/threads.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



132
133
134
# File 'lib/byebug/commands/threads.rb', line 132

def description
  %{th[read] stop <nnn>\t\tstop thread nnn}
end

.namesObject



128
129
130
# File 'lib/byebug/commands/threads.rb', line 128

def names
  %w(thread)
end

Instance Method Details

#executeObject



120
121
122
123
124
125
# File 'lib/byebug/commands/threads.rb', line 120

def execute
  c = parse_thread_num_for_cmd('thread stop', @match[1])
  return unless c
  c.suspend
  display_context(c)
end

#regexpObject



116
117
118
# File 'lib/byebug/commands/threads.rb', line 116

def regexp
  /^\s* th(?:read)? \s+ stop \s* (\S*) \s*$/x
end