Class: Byebug::DeleteCommand
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Command
commands, find, format_subcmd, format_subcmds, help, inherited, #initialize, load_commands, #match
Class Method Details
.description ⇒ Object
30
31
32
33
34
35
|
# File 'lib/byebug/commands/delete.rb', line 30
def description
%{del[ete][ nnn...]
Without and argument, deletes all breakpoints. With integer arguments,
it deletes specific breakpoints.}
end
|
.names ⇒ Object
26
27
28
|
# File 'lib/byebug/commands/delete.rb', line 26
def names
%w(delete)
end
|
Instance Method Details
#execute ⇒ Object
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/byebug/commands/delete.rb', line 10
def execute
return errmsg "We are not in a state we can delete breakpoints.\n" unless
@state.context
if not @match[1]
Byebug.breakpoints.clear if confirm("Delete all breakpoints? (y or n) ")
else
@match[1].split(/[ \t]+/).each do |pos|
return unless pos = get_int(pos, "Delete", 1)
errmsg "No breakpoint number %d\n", pos unless
Byebug.remove_breakpoint(pos)
end
end
end
|
#regexp ⇒ Object
6
7
8
|
# File 'lib/byebug/commands/delete.rb', line 6
def regexp
/^\s* del(?:ete)? (?:\s+(.*))?$/x
end
|