Class: Byebug::ThreadCurrentCommand

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

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



106
107
108
# File 'lib/byebug/commands/threads.rb', line 106

def description
  %{th[read] [cur[rent]]\t\tshow current thread}
end

.namesObject



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

def names
  %w(thread)
end

Instance Method Details

#executeObject



97
98
99
# File 'lib/byebug/commands/threads.rb', line 97

def execute
  display_context(@state.context)
end

#regexpObject



93
94
95
# File 'lib/byebug/commands/threads.rb', line 93

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