Class: Debugger::SkipCommand

Inherits:
Command
  • Object
show all
Defined in:
lib/ruby-debug/commands/skip.rb

Overview

Implements debugger “skip” command

Constant Summary

Constants inherited from Command

Command::DEF_OPTIONS

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Command

commands, #find, inherited, #initialize, load_commands, #match, method_missing, options, register_setting_get, register_setting_set, register_setting_var, settings, settings_map

Constructor Details

This class inherits a constructor from Debugger::Command

Class Method Details

.help(cmd) ⇒ Object



24
25
26
27
28
29
30
31
32
# File 'lib/ruby-debug/commands/skip.rb', line 24

def help(cmd)
  %{
    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

.help_commandObject



20
21
22
# File 'lib/ruby-debug/commands/skip.rb', line 20

def help_command
  %w[skip]
end

Instance Method Details

#executeObject



14
15
16
17
# File 'lib/ruby-debug/commands/skip.rb', line 14

def execute
  Debugger::skip_next_exception
  print pr("skip.messages.ok")
end

#regexpObject



7
8
9
10
11
12
# File 'lib/ruby-debug/commands/skip.rb', line 7

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