Class: Byebug::ThreadListCommand
- Includes:
- ThreadFunctions
- Defined in:
- lib/byebug/commands/threads.rb
Overview
List current threads.
Class Method Summary collapse
Instance Method Summary collapse
Methods included from ThreadFunctions
#display_context, #parse_thread_num, #parse_thread_num_for_cmd, #thread_arguments
Methods inherited from Command
commands, find, format_subcmd, format_subcmds, help, inherited, #initialize, #match
Methods included from StringFunctions
Methods included from FileFunctions
#get_line, #get_lines, #n_lines, #normalize
Methods included from ParseFunctions
#get_int, #parse_steps, #syntax_valid?
Constructor Details
This class inherits a constructor from Byebug::Command
Class Method Details
.description ⇒ Object
98 99 100 101 102 |
# File 'lib/byebug/commands/threads.rb', line 98 def description prettify <<-EOD th[read] l[ist] Lists all threads. EOD end |
.names ⇒ Object
94 95 96 |
# File 'lib/byebug/commands/threads.rb', line 94 def names %w(thread) end |
Instance Method Details
#execute ⇒ Object
83 84 85 86 87 88 89 90 91 |
# File 'lib/byebug/commands/threads.rb', line 83 def execute contexts = Byebug.contexts.sort_by(&:thnum) thread_list = prc('thread.context', contexts) do |context, _| thread_arguments(context) end print(thread_list) end |
#regexp ⇒ Object
79 80 81 |
# File 'lib/byebug/commands/threads.rb', line 79 def regexp /^\s* th(?:read)? \s+ l(?:ist)? \s*$/x end |