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



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

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

.help_commandObject



45
46
47
# File 'lib/ruby-debug/commands/frame.rb', line 45

def help_command
  %w|where backtrace|
end

Instance Method Details

#executeObject



40
41
42
# File 'lib/ruby-debug/commands/frame.rb', line 40

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

#regexpObject



36
37
38
# File 'lib/ruby-debug/commands/frame.rb', line 36

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