Class: Byebug::NextCommand

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

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Command

commands, find, format_subcmd, format_subcmds, help, inherited, #initialize, load_commands, #match

Constructor Details

This class inherits a constructor from Byebug::Command

Class Method Details

.descriptionObject



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

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



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

def names
  %w(next)
end

Instance Method Details

#executeObject



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

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



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

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