Class: Debugger::AddDisplayCommand
Overview
Constant Summary
Constants inherited
from Command
Command::DEF_OPTIONS
Class Method Summary
collapse
Instance Method Summary
collapse
#display_expression
Methods inherited from Command
commands, inherited, #initialize, load_commands, #match, method_missing, options
Class Method Details
.help(cmd) ⇒ Object
27
28
29
30
31
|
# File 'lib/ruby-debug/commands/display.rb', line 27
def help(cmd)
%{
disp[lay] <expression>\tadd expression into display expression list
}
end
|
.help_command ⇒ Object
23
24
25
|
# File 'lib/ruby-debug/commands/display.rb', line 23
def help_command
'display'
end
|
Instance Method Details
#execute ⇒ Object
15
16
17
18
19
20
|
# File 'lib/ruby-debug/commands/display.rb', line 15
def execute
exp = @match[1]
@state.display.push [true, exp]
print "%d: ", @state.display.size
display_expression(exp)
end
|
#regexp ⇒ Object
11
12
13
|
# File 'lib/ruby-debug/commands/display.rb', line 11
def regexp
/^\s*disp(?:lay)?\s+(.+)$/
end
|