Class: Debugger::ThreadCurrentCommand

Inherits:
Command
  • Object
show all
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 inherited from Command

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

Constructor Details

This class inherits a constructor from Debugger::Command

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Debugger::Command

Class Method Details

.help(cmd) ⇒ Object



112
113
114
115
116
# File 'lib/ruby-debug/commands/threads.rb', line 112

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

.help_commandObject



108
109
110
# File 'lib/ruby-debug/commands/threads.rb', line 108

def help_command
  'thread'
end

Instance Method Details

#executeObject



103
104
105
# File 'lib/ruby-debug/commands/threads.rb', line 103

def execute
  print_context(@state.context)
end

#regexpObject



99
100
101
# File 'lib/ruby-debug/commands/threads.rb', line 99

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