Class: Byebug::DisableCommand::BreakpointsCommand

Inherits:
Command
  • Object
show all
Includes:
Helpers::ToggleHelper
Defined in:
lib/byebug/commands/disable/breakpoints.rb

Overview

Disables all or specific breakpoints

Instance Attribute Summary

Attributes inherited from Command

#processor

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Helpers::ToggleHelper

#enable_disable_breakpoints, #enable_disable_display

Methods included from Helpers::ParseHelper

#get_int, #parse_steps, #syntax_valid?

Methods inherited from Command

#arguments, columnize, #context, #frame, help, #initialize, match, to_s

Methods included from Helpers::StringHelper

#camelize, #prettify

Constructor Details

This class inherits a constructor from Byebug::Command

Class Method Details

.descriptionObject



20
21
22
23
24
25
26
27
28
29
# File 'lib/byebug/commands/disable/breakpoints.rb', line 20

def self.description
  <<-EOD
    dis[able] b[reakpoints][ <id1> <id2> .. <idn>]

    #{short_description}

    Give breakpoint numbers (separated by spaces) as arguments or no
    argument at all if you want to disable every breakpoint.
  EOD
end

.regexpObject



16
17
18
# File 'lib/byebug/commands/disable/breakpoints.rb', line 16

def self.regexp
  /^\s* b(?:reakpoints)? (?:\s+ (.+))? \s*$/x
end

.short_descriptionObject



31
32
33
# File 'lib/byebug/commands/disable/breakpoints.rb', line 31

def self.short_description
  'Disable all or specific breakpoints.'
end

Instance Method Details

#executeObject



35
36
37
# File 'lib/byebug/commands/disable/breakpoints.rb', line 35

def execute
  enable_disable_breakpoints('disable', @match[1])
end