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

Class Method Details

.help(cmd) ⇒ Object



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

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

.help_commandObject



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

def help_command
  'step'
end

Instance Method Details

#executeObject



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

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

#regexpObject



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

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