File: down.rb

package info (click to toggle)
ruby-pry-byebug 3.9.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 324 kB
  • sloc: ruby: 1,171; makefile: 4
file content (35 lines) | stat: -rw-r--r-- 678 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# frozen_string_literal: true

require "pry-byebug/helpers/navigation"

module PryByebug
  #
  # Travel down the frame stack
  #
  class DownCommand < Pry::ClassCommand
    include Helpers::Navigation

    match "down"
    group "Byebug"

    description "Move current frame down."

    banner <<-BANNER
      Usage: down [TIMES]

      Move current frame down. By default, moves by 1 frame.

      Examples:
        down   #=> Move down 1 frame.
        down 5 #=> Move down 5 frames.
    BANNER

    def process
      PryByebug.check_file_context(target)

      breakout_navigation :down, times: args.first
    end
  end
end

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