Class: Debugger::DeleteBreakpointCommand
- Inherits:
-
Command
- Object
- SimpleDelegator
- Command
- Debugger::DeleteBreakpointCommand
show all
- Defined in:
- lib/ruby-debug-ide/commands/breakpoints.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, unescape_incoming
Class Method Details
.help(cmd) ⇒ Object
132
133
134
135
136
|
# File 'lib/ruby-debug-ide/commands/breakpoints.rb', line 132
def help(cmd)
%{
del[ete][ nnn...]\tdelete some or all breakpoints
}
end
|
.help_command ⇒ Object
128
129
130
|
# File 'lib/ruby-debug-ide/commands/breakpoints.rb', line 128
def help_command
'delete'
end
|
Instance Method Details
#execute ⇒ Object
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
|
# File 'lib/ruby-debug-ide/commands/breakpoints.rb', line 109
def execute
brkpts = @match[1]
unless brkpts
Debugger.breakpoints.clear
else
brkpts.split(/[ \t]+/).each do |pos|
pos = get_int(pos, "Delete", 1)
return unless pos
b = Debugger.remove_breakpoint(pos)
if b
print_breakpoint_deleted b
else
print_error "No breakpoint number %d\n", pos
end
end
end
end
|
#regexp ⇒ Object
105
106
107
|
# File 'lib/ruby-debug-ide/commands/breakpoints.rb', line 105
def regexp
/^\s*del(?:ete)?(?:\s+(.*))?$/
end
|