Class: Debugger::DownCommand

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

#adjust_frame, #get_int

Methods inherited from Command

commands, 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



119
120
121
122
123
# File 'lib/ruby-debug/commands/frame.rb', line 119

def help(cmd)
  %{
    down[count]\tmove to lower frame
  }
end

.help_commandObject



115
116
117
# File 'lib/ruby-debug/commands/frame.rb', line 115

def help_command
  'down'
end

Instance Method Details

#executeObject



104
105
106
107
108
109
110
111
112
# File 'lib/ruby-debug/commands/frame.rb', line 104

def execute
  if not @match[1]
    pos = 1
  else
    pos = get_int(@match[1], "Down")
    return unless pos
  end
  adjust_frame(-pos, false)
end

#regexpObject



100
101
102
# File 'lib/ruby-debug/commands/frame.rb', line 100

def regexp
  /^\s* down (?:\s+(.*))? .*$/x
end