Class: Debugger::WhereCommand

Inherits:
Command
  • Object
show all
Defined in:
lib/ruby-debug/commands/frame.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



47
48
49
50
51
52
53
54
55
56
57
# File 'lib/ruby-debug/commands/frame.rb', line 47

def help(cmd)
  if cmd == 'where'
    %{
      w[here]\tdisplay frames
    }
  else
    %{
      bt|backtrace\t\talias for where
    }
  end
end

.help_commandObject



43
44
45
# File 'lib/ruby-debug/commands/frame.rb', line 43

def help_command
  %w|where backtrace|
end

Instance Method Details

#executeObject



38
39
40
# File 'lib/ruby-debug/commands/frame.rb', line 38

def execute
  print_frames(@state.context, @state.frame_pos)
end

#regexpObject



34
35
36
# File 'lib/ruby-debug/commands/frame.rb', line 34

def regexp
  /^\s*(?:w(?:here)?|bt|backtrace)$/
end