Class: Byebug::DisplayCommand

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

Overview

Displays the value of enabled expressions.

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Command

commands, find, format_subcmd, format_subcmds, help, inherited, #initialize, #match

Methods included from StringFunctions

#camelize, #prettify

Methods included from FileFunctions

#get_line, #get_lines, #n_lines, #normalize

Methods included from ParseFunctions

#get_int, #parse_steps, #syntax_valid?

Constructor Details

This class inherits a constructor from Byebug::Command

Class Method Details

.always_runObject



51
52
53
# File 'lib/byebug/commands/display.rb', line 51

def self.always_run
  2
end

.descriptionObject



68
69
70
71
72
# File 'lib/byebug/commands/display.rb', line 68

def description
  prettify <<-EOD
    disp[lay] Display expression list.
  EOD
end

.namesObject



64
65
66
# File 'lib/byebug/commands/display.rb', line 64

def names
  %w(display)
end

Instance Method Details

#executeObject



59
60
61
# File 'lib/byebug/commands/display.rb', line 59

def execute
  print_display_expressions
end

#regexpObject



55
56
57
# File 'lib/byebug/commands/display.rb', line 55

def regexp
  /^\s* disp(?:lay)? \s*$/x
end