Class: Debugger::ThreadListCommand
- Inherits:
-
Command
- Object
- Command
- Debugger::ThreadListCommand
show all
- Defined in:
- lib/ruby-debug/commands/threads.rb
Overview
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
Class Method Details
.help(cmd) ⇒ Object
62
63
64
65
66
|
# File 'lib/ruby-debug/commands/threads.rb', line 62
def help(cmd)
%{
th[read] l[ist]\t\t\tlist all threads
}
end
|
.help_command ⇒ Object
58
59
60
|
# File 'lib/ruby-debug/commands/threads.rb', line 58
def help_command
'thread'
end
|
Instance Method Details
#execute ⇒ Object
51
52
53
54
55
|
# File 'lib/ruby-debug/commands/threads.rb', line 51
def execute
threads = Debugger.contexts.sort_by{|c| c.thnum}.each do |c|
display_context(c)
end
end
|
#regexp ⇒ Object
47
48
49
|
# File 'lib/ruby-debug/commands/threads.rb', line 47
def regexp
/^\s*th(?:read)?\s+l(?:ist)?\s*$/
end
|