Class: Debugger::DeleteDisplayCommand
Overview
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, #initialize, load_commands, #match, method_missing, options
Class Method Details
.help(cmd) ⇒ Object
96
97
98
99
100
|
# File 'lib/ruby-debug/commands/display.rb', line 96
def help(cmd)
%{
undisp[lay][ nnn]\tdelete one particular or all display expressions
}
end
|
.help_command ⇒ Object
92
93
94
|
# File 'lib/ruby-debug/commands/display.rb', line 92
def help_command
'undisplay'
end
|
Instance Method Details
#execute ⇒ Object
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
# File 'lib/ruby-debug/commands/display.rb', line 74
def execute
unless pos = @match[1]
if confirm("Clear all expressions? (y/n) ")
for d in @state.display
d[0] = false
end
end
else
pos = pos.to_i
if @state.display[pos-1]
@state.display[pos-1][0] = false
else
print "Display expression %d is not defined\n", pos
end
end
end
|
#regexp ⇒ Object
70
71
72
|
# File 'lib/ruby-debug/commands/display.rb', line 70
def regexp
/^\s*undisp(?:lay)?(?:\s+(\d+))?$/
end
|