Class: Byebug::SkipCommand

Inherits:
Command
  • Object
show all
Defined in:
lib/byebug/commands/skip.rb

Overview

Implements byebug “skip” command

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Command

command_exists?, commands, find, format_subcmd, format_subcmds, help, inherited, #initialize, load_commands, #match, register_setting_get, register_setting_set, register_setting_var, settings, settings_map, terminal_width

Constructor Details

This class inherits a constructor from Byebug::Command

Class Method Details

.descriptionObject



21
22
23
24
25
26
27
# File 'lib/byebug/commands/skip.rb', line 21

def description
  %{sk[ip]\tskip the next thrown exception

    This is useful if you've explicitly caught an exception through the
    "catch" command, and wish to pass the exception on to the code that
    you're debugging.}
end

.namesObject



17
18
19
# File 'lib/byebug/commands/skip.rb', line 17

def names
  %w(skip)
end

Instance Method Details

#executeObject



11
12
13
14
# File 'lib/byebug/commands/skip.rb', line 11

def execute
  Byebug::skip_next_exception
  print "ok\n"
end

#regexpObject



7
8
9
# File 'lib/byebug/commands/skip.rb', line 7

def regexp
  /^\s* sk(?:ip)? \s*$/x
end