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

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



135
136
137
# File 'lib/byebug/commands/threads.rb', line 135

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

.namesObject



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

def names
  %w(thread)
end

Instance Method Details

#executeObject



123
124
125
126
127
128
# File 'lib/byebug/commands/threads.rb', line 123

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

#regexpObject



119
120
121
# File 'lib/byebug/commands/threads.rb', line 119

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