Class: Debugger::DisplayCommand
Constant Summary
Constants inherited
from Command
Command::DEF_OPTIONS
Class Method Summary
collapse
Instance Method Summary
collapse
#display_expression
Methods inherited from Command
commands, inherited, load_commands, #match, method_missing, options
Constructor Details
Returns a new instance of DisplayCommand.
39
40
41
|
# File 'lib/ruby-debug/commands/display.rb', line 39
def initialize(state)
super
end
|
Class Method Details
.help(cmd) ⇒ Object
63
64
65
66
67
|
# File 'lib/ruby-debug/commands/display.rb', line 63
def help(cmd)
%{
disp[lay]\t\tdisplay expression list
}
end
|
.help_command ⇒ Object
59
60
61
|
# File 'lib/ruby-debug/commands/display.rb', line 59
def help_command
'display'
end
|
Instance Method Details
#execute ⇒ Object
47
48
49
50
51
52
53
54
55
56
|
# File 'lib/ruby-debug/commands/display.rb', line 47
def execute
n = 1
for d in @state.display
if d[0]
print "%d: ", n
display_expression(d[1])
end
n += 1
end
end
|
#regexp ⇒ Object
43
44
45
|
# File 'lib/ruby-debug/commands/display.rb', line 43
def regexp
/^\s*disp(?:lay)?$/
end
|