Class: Byebug::ThreadCurrentCommand

Inherits:
Command
  • Object
show all
Defined in:
lib/byebug/commands/threads.rb

Overview

Show current thread.

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Command

commands, find, format_subcmd, format_subcmds, help, inherited, #initialize, load_commands, #match

Constructor Details

This class inherits a constructor from Byebug::Command

Class Method Details

.descriptionObject



112
113
114
# File 'lib/byebug/commands/threads.rb', line 112

def description
  %(th[read] [cur[rent]]        Shows current thread.)
end

.namesObject



108
109
110
# File 'lib/byebug/commands/threads.rb', line 108

def names
  %w(thread)
end

Instance Method Details

#executeObject



103
104
105
# File 'lib/byebug/commands/threads.rb', line 103

def execute
  display_context(@state.context)
end

#regexpObject



99
100
101
# File 'lib/byebug/commands/threads.rb', line 99

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