Class: Byebug::DisableCommand::DisplayCommand

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

Overview

Enables all or specific displays

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
32
# File 'lib/byebug/commands/disable/display.rb', line 22

def self.description
  <<-DESCRIPTION
    dis[able] d[isplay][ <id1> <id2> .. <idn>]

    #{short_description}

    Arguments are the code numbers of the expressions to disable. Do "info
    display" to see the current list of code numbers. If no arguments are
    specified, all displays are disabled.
  DESCRIPTION
end

.regexpObject



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

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

.short_descriptionObject



34
35
36
# File 'lib/byebug/commands/disable/display.rb', line 34

def self.short_description
  "Disables expressions to be displayed when program stops."
end

Instance Method Details

#executeObject



38
39
40
# File 'lib/byebug/commands/disable/display.rb', line 38

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