Class: Debugger::ThreadListCommand

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



73
74
75
76
77
# File 'lib/ruby-debug/commands/threads.rb', line 73

def help(cmd)
  %{
    th[read] l[ist]\t\t\tlist all threads
  }
end

.help_commandObject



69
70
71
# File 'lib/ruby-debug/commands/threads.rb', line 69

def help_command
  'thread'
end

Instance Method Details

#executeObject



64
65
66
# File 'lib/ruby-debug/commands/threads.rb', line 64

def execute
  print prc("thread.context", Debugger.contexts.sort_by(&:thnum)) { |context, _| thread_arguments(context) }
end

#regexpObject



60
61
62
# File 'lib/ruby-debug/commands/threads.rb', line 60

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