Class: Debugger::AddDisplayCommand

Inherits:
Command
  • Object
show all
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 inherited from Command

commands, #find, inherited, #initialize, load_commands, #match, method_missing, options, register_setting_get, register_setting_set, register_setting_var, settings, settings_map

Constructor Details

This class inherits a constructor from Debugger::Command

Class Method Details

.help(cmd) ⇒ Object



32
33
34
35
36
# File 'lib/ruby-debug/commands/display.rb', line 32

def help(cmd)
  %{
    disp[lay] <expression>\tadd expression into display expression list
  }
end

.help_commandObject



28
29
30
# File 'lib/ruby-debug/commands/display.rb', line 28

def help_command
  'display'
end

Instance Method Details

#executeObject



21
22
23
24
25
# File 'lib/ruby-debug/commands/display.rb', line 21

def execute
  exp = @match[1]
  @state.display.push [true, exp]
  display_expression(exp)
end

#regexpObject



17
18
19
# File 'lib/ruby-debug/commands/display.rb', line 17

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