Class: Debugger::DownCommand
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
118
119
120
121
122
|
# File 'lib/ruby-debug/commands/frame.rb', line 118
def help(cmd)
%{
down[ nn]\tmove to lower frame
}
end
|
.help_command ⇒ Object
114
115
116
|
# File 'lib/ruby-debug/commands/frame.rb', line 114
def help_command
'down'
end
|
Instance Method Details
#execute ⇒ Object
101
102
103
104
105
106
107
108
109
110
111
|
# File 'lib/ruby-debug/commands/frame.rb', line 101
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.context.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
97
98
99
|
# File 'lib/ruby-debug/commands/frame.rb', line 97
def regexp
/^\s*down(?:\s+(\d+))?$/
end
|