Class: Debugger::StepCommand

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

Overview

:nodoc:

Constant Summary

Constants inherited from Command

Command::DEF_OPTIONS

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Command

commands, inherited, #initialize, load_commands, #match, method_missing, options

Constructor Details

This class inherits a constructor from Debugger::Command

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Debugger::Command

Class Method Details

.help(cmd) ⇒ Object



46
47
48
49
50
# File 'lib/ruby-debug/commands/stepping.rb', line 46

def help(cmd)
  %{
    s[tep][ nnn]\tstep (into methods) one line or till line nnn
  }
end

.help_commandObject



42
43
44
# File 'lib/ruby-debug/commands/stepping.rb', line 42

def help_command
  'step'
end

Instance Method Details

#executeObject



36
37
38
39
# File 'lib/ruby-debug/commands/stepping.rb', line 36

def execute
  @state.context.stop_next = @match[1] ? @match[1].to_i : 1
  @state.proceed
end

#regexpObject



32
33
34
# File 'lib/ruby-debug/commands/stepping.rb', line 32

def regexp
  /^\s*s(?:tep)?(?:\s+(\d+))?$/
end