Class: Byebug::DisplayCommand
Overview
Custom expressions to be displayed every time the debugger stops.
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Command
#help, #initialize, #match, subcommands, to_name
#camelize, #prettify
Class Method Details
.always_run ⇒ Object
10
11
12
|
# File 'lib/byebug/commands/display.rb', line 10
def self.always_run
2
end
|
Instance Method Details
#description ⇒ Object
25
26
27
28
29
30
31
32
|
# File 'lib/byebug/commands/display.rb', line 25
def description
<<-EOD
disp[lay][ <expression>]
If <expression> specified, adds <expression> into display expression
list. Otherwise, it lists all expressions.
EOD
end
|
#execute ⇒ Object
18
19
20
21
22
23
|
# File 'lib/byebug/commands/display.rb', line 18
def execute
return print_display_expressions unless @match && @match[1]
@state.display.push [true, @match[1]]
display_expression(@match[1])
end
|
#regexp ⇒ Object
14
15
16
|
# File 'lib/byebug/commands/display.rb', line 14
def regexp
/^\s* disp(?:lay)? (?:\s+ (.+))? \s*$/x
end
|