Class: Debugger::AddDisplayCommand
- Inherits:
-
Command
- Object
- Command
- Debugger::AddDisplayCommand
show all
- Defined in:
- lib/ruby-debug/commands/display.rb
Overview
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
Class Method Details
.help(cmd) ⇒ Object
40
41
42
43
44
|
# File 'lib/ruby-debug/commands/display.rb', line 40
def help(cmd)
%{
disp[lay] <expression>\tadd expression into display expression list
}
end
|
.help_command ⇒ Object
36
37
38
|
# File 'lib/ruby-debug/commands/display.rb', line 36
def help_command
'display'
end
|
Instance Method Details
#execute ⇒ Object
28
29
30
31
32
33
|
# File 'lib/ruby-debug/commands/display.rb', line 28
def execute
exp = @match[1]
@state.display.push [true, exp]
print "%d: ", @state.display.size
display_expression(exp)
end
|
#regexp ⇒ Object
24
25
26
|
# File 'lib/ruby-debug/commands/display.rb', line 24
def regexp
/^\s*disp(?:lay)?\s+(.+)$/
end
|