Class: Byebug::NextCommand

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

Overview

Implements byebug “next” 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



39
40
41
42
43
44
# File 'lib/byebug/commands/stepping.rb', line 39

def description
  %{n[ext][+-]?[ nnn]\tstep over once or nnn times,
    \t\t'+' forces to move to another line.
    \t\t'-' is the opposite of '+' and disables the :forcestep setting.
   }
end

.namesObject



35
36
37
# File 'lib/byebug/commands/stepping.rb', line 35

def names
  %w(next)
end

Instance Method Details

#executeObject



27
28
29
30
31
32
# File 'lib/byebug/commands/stepping.rb', line 27

def execute
  steps, force = parse_stepping_args("Next", @match)
  return unless steps
  @state.context.step_over steps, @state.frame_pos, force
  @state.proceed
end

#regexpObject



23
24
25
# File 'lib/byebug/commands/stepping.rb', line 23

def regexp
  /^\s* n(?:ext)?([+-])? (?:\s+(\S+))? \s*$/x
end