Class: Debugger::ThreadCurrentCommand

Inherits:
Command
  • Object
show all
Includes:
ThreadFunctions
Defined in:
lib/ruby-debug/commands/threads.rb

Overview

:nodoc:

Constant Summary

Constants inherited from Command

Command::DEF_OPTIONS

Class Method Summary collapse

Instance Method Summary collapse

Methods included from ThreadFunctions

#debugger_thread?, #display_context

Methods inherited from Command

commands, inherited, #initialize, load_commands, #match, method_missing, options

Constructor Details

This class inherits a constructor from Debugger::Command

Class Method Details

.help(cmd) ⇒ Object



140
141
142
143
144
# File 'lib/ruby-debug/commands/threads.rb', line 140

def help(cmd)
  %{
    th[read] c[ur[rent]]\t\tshow current thread
  }
end

.help_commandObject



136
137
138
# File 'lib/ruby-debug/commands/threads.rb', line 136

def help_command
  'thread'
end

Instance Method Details

#executeObject



131
132
133
# File 'lib/ruby-debug/commands/threads.rb', line 131

def execute
  display_context(@state.context)
end

#regexpObject



127
128
129
# File 'lib/ruby-debug/commands/threads.rb', line 127

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