Class: Debugger::ThreadResumeCommand

Inherits:
Command
  • Object
show all
Defined in:
lib/ruby-debug-ide/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, file_filter_supported?, #find, inherited, #initialize, load_commands, #match, method_missing, options, unescape_incoming

Constructor Details

This class inherits a constructor from Debugger::Command

Class Method Details

.help(cmd) ⇒ Object


171
172
173
174
175
# File 'lib/ruby-debug-ide/commands/threads.rb', line 171

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

.help_commandObject


167
168
169
# File 'lib/ruby-debug-ide/commands/threads.rb', line 167

def help_command
  'thread'
end

Instance Method Details

#executeObject


153
154
155
156
157
158
159
160
161
162
163
164
# File 'lib/ruby-debug-ide/commands/threads.rb', line 153

def execute
  c = get_context(@match[1].to_i)
  case
  when c == @state.context
    print_msg "It's the current thread."
  when c.ignored?
    print_msg "Can't resume the debugger thread."
  else
    c.resume
    print_context(c)
  end
end

#regexpObject


149
150
151
# File 'lib/ruby-debug-ide/commands/threads.rb', line 149

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