Class: Debugger::ThreadCurrentCommand

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



193
194
195
196
197
# File 'lib/ruby-debug/commands/threads.rb', line 193

def help(cmd)
  %{
    th[read] [cur[rent]]\t\tshow current thread
  }
end

.help_commandObject



189
190
191
# File 'lib/ruby-debug/commands/threads.rb', line 189

def help_command
  'thread'
end

Instance Method Details

#executeObject



184
185
186
# File 'lib/ruby-debug/commands/threads.rb', line 184

def execute
  display_context(@state.context)
end

#regexpObject



180
181
182
# File 'lib/ruby-debug/commands/threads.rb', line 180

def regexp
  /^\s*th(?:read)?\s*(?:cur(?:rent)?)?\s*$/
end