Class: Debugger::DownCommand
Overview
Constant Summary
Constants inherited
from Command
Command::DEF_OPTIONS
Class Method Summary
collapse
Instance Method Summary
collapse
#format_frame
Methods inherited from Command
commands, inherited, #initialize, load_commands, #match, method_missing, options
Class Method Details
.help(cmd) ⇒ Object
119
120
121
122
123
|
# File 'lib/ruby-debug/commands/frame.rb', line 119
def help(cmd)
%{
down[ nn]\tmove to lower frame
}
end
|
.help_command ⇒ Object
115
116
117
|
# File 'lib/ruby-debug/commands/frame.rb', line 115
def help_command
'down'
end
|
Instance Method Details
#execute ⇒ Object
102
103
104
105
106
107
108
109
110
111
112
|
# File 'lib/ruby-debug/commands/frame.rb', line 102
def execute
@state.previous_line = nil
@state.frame_pos -= @match[1] ? @match[1].to_i : 1
if @state.frame_pos < 0
@state.frame_pos = 0
print "At stack bottom\n"
end
frame = @state.frames[@state.frame_pos]
@state.binding, @state.file, @state.line = frame.binding, frame.file, frame.line
print format_frame(frame, @state.frame_pos)
end
|
#regexp ⇒ Object
98
99
100
|
# File 'lib/ruby-debug/commands/frame.rb', line 98
def regexp
/^\s*down(?:\s+(\d+))?$/
end
|