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