Class: Byebug::ThreadListCommand
- Inherits:
-
Command
- Object
- Command
- Byebug::ThreadListCommand
show all
- Defined in:
- lib/byebug/commands/threads.rb
Overview
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Command
commands, find, format_subcmd, format_subcmds, help, inherited, #initialize, load_commands, #match
Class Method Details
.description ⇒ Object
89
90
91
|
# File 'lib/byebug/commands/threads.rb', line 89
def description
%(th[read] l[ist] Lists all threads.)
end
|
.names ⇒ Object
85
86
87
|
# File 'lib/byebug/commands/threads.rb', line 85
def names
%w(thread)
end
|
Instance Method Details
#execute ⇒ Object
79
80
81
82
|
# File 'lib/byebug/commands/threads.rb', line 79
def execute
Byebug.contexts.select { |c| Thread.list.include?(c.thread) }
.sort_by(&:thnum).each { |c| display_context(c) }
end
|
#regexp ⇒ Object
75
76
77
|
# File 'lib/byebug/commands/threads.rb', line 75
def regexp
/^\s* th(?:read)? \s+ l(?:ist)? \s*$/x
end
|