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

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

.regexpObject



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

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

.short_descriptionObject



32
33
34
# File 'lib/byebug/commands/disable/display.rb', line 32

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

Instance Method Details

#executeObject



36
37
38
# File 'lib/byebug/commands/disable/display.rb', line 36

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