Class: Debugger::ThreadResumeCommand

Inherits:
Command
  • Object
show all
Defined in:
lib/ruby-debug/commands/threads.rb

Overview

:nodoc:

Constant Summary

Constants inherited from Command

Command::DEF_OPTIONS

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Command

commands, #find, inherited, #initialize, load_commands, #match, method_missing, options, register_setting_get, register_setting_set, register_setting_var, settings, settings_map

Constructor Details

This class inherits a constructor from Debugger::Command

Class Method Details

.help(cmd) ⇒ Object



124
125
126
127
128
# File 'lib/ruby-debug/commands/threads.rb', line 124

def help(cmd)
  %{
    th[read] resume <nnn>\t\tresume thread nnn
  }
end

.help_commandObject



120
121
122
# File 'lib/ruby-debug/commands/threads.rb', line 120

def help_command
  'thread'
end

Instance Method Details

#executeObject



108
109
110
111
112
113
114
115
116
117
# File 'lib/ruby-debug/commands/threads.rb', line 108

def execute
  c = parse_thread_num_for_cmd("thread resume", @match[1])
  return unless c 
  if !c.thread.stop?
    print "Already running."
    return
  end
  c.resume
  display_context(c)
end

#regexpObject



104
105
106
# File 'lib/ruby-debug/commands/threads.rb', line 104

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