Class: Debugger::StepCommand

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

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



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

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

.help_commandObject



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

def help_command
  'step'
end

Instance Method Details

#executeObject



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

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

#regexpObject



27
28
29
# File 'lib/ruby-debug/commands/stepping.rb', line 27

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