Class: Debugger::UpCommand

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



90
91
92
93
94
# File 'lib/ruby-debug/commands/frame.rb', line 90

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

.help_commandObject



86
87
88
# File 'lib/ruby-debug/commands/frame.rb', line 86

def help_command
  'up'
end

Instance Method Details

#executeObject



75
76
77
78
79
80
81
82
83
# File 'lib/ruby-debug/commands/frame.rb', line 75

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

#regexpObject



71
72
73
# File 'lib/ruby-debug/commands/frame.rb', line 71

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