Class: Debugger::WhereCommand
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
32
33
34
35
36
37
38
39
40
41
42
|
# File 'lib/ruby-debug/commands/frame.rb', line 32
def help(cmd)
if cmd == 'where'
%{
w[here]\tdisplay frames
}
else
%{
f[rame]\t\talias for where
}
end
end
|
.help_command ⇒ Object
28
29
30
|
# File 'lib/ruby-debug/commands/frame.rb', line 28
def help_command
%w|where frame|
end
|
Instance Method Details
#execute ⇒ Object
16
17
18
19
20
21
22
23
24
25
|
# File 'lib/ruby-debug/commands/frame.rb', line 16
def execute
@state.context.frames.each_with_index do |frame, idx|
if idx == @state.frame_pos
print "--> "
else
print " "
end
print format_frame(frame, idx)
end
end
|
#regexp ⇒ Object
12
13
14
|
# File 'lib/ruby-debug/commands/frame.rb', line 12
def regexp
/^\s*(?:w(?:here)?|f(?:rame)?)$/
end
|