Class: Debugger::DeleteDisplayCommand
- Inherits:
-
Command
- Object
- Command
- Debugger::DeleteDisplayCommand
show all
- Defined in:
- lib/ruby-debug/commands/display.rb
Overview
Constant Summary
Constants inherited
from Command
Command::DEF_OPTIONS
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Command
commands, #find, inherited, #initialize, load_commands, #match, method_missing, options, register_setting_get, register_setting_set, register_setting_var, settings, settings_map
Class Method Details
.help(cmd) ⇒ Object
100
101
102
103
104
105
106
107
108
109
|
# File 'lib/ruby-debug/commands/display.rb', line 100
def help(cmd)
%{
undisp[lay][ nnn]
Cancel some expressions to be displayed when program stops.
Arguments are the code numbers of the expressions to stop displaying.
No argument means cancel all automatic-display expressions.
"delete display" has the same effect as this command.
Do "info display" to see current list of code numbers.
}
end
|
.help_command ⇒ Object
96
97
98
|
# File 'lib/ruby-debug/commands/display.rb', line 96
def help_command
'undisplay'
end
|
Instance Method Details
#execute ⇒ Object
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
# File 'lib/ruby-debug/commands/display.rb', line 77
def execute
unless pos = @match[1]
if confirm(pr("display.confirmations.clear_all"))
for d in @state.display
d[0] = false
end
end
else
pos = get_int(pos, "Undisplay")
return unless pos
if @state.display[pos-1]
@state.display[pos-1][0] = nil
else
errmsg pr("display.errors.undefined", expr: pos)
end
end
end
|
#regexp ⇒ Object
73
74
75
|
# File 'lib/ruby-debug/commands/display.rb', line 73
def regexp
/^\s* undisp(?:lay)? \s* (?:(\S+))?$/x
end
|