Class: Byebug::EnableCommand::BreakpointsCommand

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

Overview

Enables 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/enable/breakpoints.rb', line 22

def self.description
  <<-DESCRIPTION
    en[able] b[reakpoints][ <ids>]

    #{short_description}

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

.regexpObject



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

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

.short_descriptionObject



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

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

Instance Method Details

#executeObject



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

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