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, #deindent, #prettify

Constructor Details

This class inherits a constructor from Byebug::Command

Class Method Details

.descriptionObject



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

def self.description
  <<-DESCRIPTION
    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.
  DESCRIPTION
end

.regexpObject



18
19
20
# File 'lib/byebug/commands/disable/breakpoints.rb', line 18

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

.short_descriptionObject



33
34
35
# File 'lib/byebug/commands/disable/breakpoints.rb', line 33

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

Instance Method Details

#executeObject



37
38
39
# File 'lib/byebug/commands/disable/breakpoints.rb', line 37

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