Class: Debugger::DisplayCommand

Inherits:
Command
  • Object
show all
Includes:
DisplayFunctions
Defined in:
lib/ruby-debug/commands/display.rb

Overview

:nodoc:

Constant Summary

Constants inherited from Command

Command::DEF_OPTIONS

Class Method Summary collapse

Instance Method Summary collapse

Methods included from DisplayFunctions

#display_expression

Methods inherited from Command

commands, inherited, #initialize, load_commands, #match, method_missing, options

Constructor Details

This class inherits a constructor from Debugger::Command

Class Method Details

.help(cmd) ⇒ Object



59
60
61
62
63
# File 'lib/ruby-debug/commands/display.rb', line 59

def help(cmd)
  %{
    disp[lay]\t\tdisplay expression list
  }
end

.help_commandObject



55
56
57
# File 'lib/ruby-debug/commands/display.rb', line 55

def help_command
  'display'
end

Instance Method Details

#executeObject



43
44
45
46
47
48
49
50
51
52
# File 'lib/ruby-debug/commands/display.rb', line 43

def execute
  n = 1
  for d in @state.display
    if d[0]
      print "%d: ", n
      display_expression(d[1])
    end
    n += 1
  end
end

#regexpObject



39
40
41
# File 'lib/ruby-debug/commands/display.rb', line 39

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