Class: Byebug::AddDisplayCommand
- Defined in:
- lib/byebug/commands/display.rb
Overview
Implements the functionality of adding custom expressions to be displayed every time the debugger stops.
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Command
commands, find, format_subcmd, format_subcmds, help, inherited, #initialize, #match
Methods included from StringFunctions
Methods included from FileFunctions
#get_line, #get_lines, #n_lines, #normalize
Methods included from ParseFunctions
#get_int, #parse_steps, #syntax_valid?
Constructor Details
This class inherits a constructor from Byebug::Command
Class Method Details
.description ⇒ Object
26 27 28 29 30 31 32 |
# File 'lib/byebug/commands/display.rb', line 26 def description prettify " disp[lay] <expression>\n\n Add <expression> into display expression list.\n EOD\nend\n" |
.names ⇒ Object
22 23 24 |
# File 'lib/byebug/commands/display.rb', line 22 def names %w(display) end |
Instance Method Details
#execute ⇒ Object
15 16 17 18 19 |
# File 'lib/byebug/commands/display.rb', line 15 def execute exp = @match[1] @state.display.push [true, exp] display_expression(exp) end |
#regexp ⇒ Object
11 12 13 |
# File 'lib/byebug/commands/display.rb', line 11 def regexp /^\s* disp(?:lay)? \s+ (.+) \s*$/x end |