Class: Byebug::ThreadCurrentCommand

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

Constant Summary

Constants inherited from Command

Command::DEF_OPTIONS

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Command

command_exists?, commands, find, format_subcmd, format_subcmds, help, inherited, #initialize, load_commands, #match, method_missing, options, register_setting_get, register_setting_set, register_setting_var, settings, settings_map, terminal_width

Constructor Details

This class inherits a constructor from Byebug::Command

Class Method Details

.descriptionObject



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

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

.namesObject



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

def names
  %w(thread)
end

Instance Method Details

#executeObject



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

def execute
  display_context(@state.context)
end

#regexpObject



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

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