Sha256: babf912f313a785cc3e629d0dc94fa682ef23d6349fdf92e2706e6786c7d8f30

Contents?: true

Size: 840 Bytes

Versions: 2

Compression:

Stored size: 840 Bytes

Contents

require "pry-byebug/helpers/navigation"
require "pry-byebug/helpers/multiline"

module PryByebug
  #
  # Run a number of lines and then stop again
  #
  class NextCommand < Pry::ClassCommand
    include Helpers::Navigation
    include Helpers::Multiline

    match "next"
    group "Byebug"
    description "Execute the next line within the current stack frame."

    banner <<-BANNER
      Usage: next [LINES]

      Step over within the same frame. By default, moves forward a single
      line.

      Examples:
        next   #=> Move a single line forward.
        next 4 #=> Execute the next 4 lines.
    BANNER

    def process
      return if check_multiline_context

      PryByebug.check_file_context(target)

      breakout_navigation :next, lines: args.first
    end
  end
end

Pry::Commands.add_command(PryByebug::NextCommand)

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
dadapush_client-1.0.1 vendor/bundle/ruby/2.3.0/gems/pry-byebug-3.6.0/lib/pry-byebug/commands/next.rb
pry-byebug-3.6.0 lib/pry-byebug/commands/next.rb