Class: Byebug::AddDisplayCommand
- Inherits:
-
Command
- Object
- Command
- Byebug::AddDisplayCommand
show all
- Defined in:
- lib/byebug/commands/display.rb
Constant Summary
Constants inherited
from Command
Command::DEF_OPTIONS
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Command
commands, format_subcmd, format_subcmds, help, inherited, #initialize, load_commands, #match, method_missing, options, register_setting_get, register_setting_set, register_setting_var, settings, settings_map
Class Method Details
.description ⇒ Object
41
42
43
44
45
|
# File 'lib/byebug/commands/display.rb', line 41
def description
%{
disp[lay] <expression>\tadd expression into display expression list
}
end
|
.names ⇒ Object
37
38
39
|
# File 'lib/byebug/commands/display.rb', line 37
def names
%w(display)
end
|
Instance Method Details
#execute ⇒ Object
29
30
31
32
33
34
|
# File 'lib/byebug/commands/display.rb', line 29
def execute
exp = @match[1]
@state.display.push [true, exp]
print "#{@state.display.size}: "
display_expression(exp)
end
|
#regexp ⇒ Object
25
26
27
|
# File 'lib/byebug/commands/display.rb', line 25
def regexp
/^\s*disp(?:lay)?\s+(.+)$/
end
|