Sha256: 73abce52bd2d527cc57a88e235ca010f00e346e3143e4a1c25392b785fec8f56

Contents?: true

Size: 712 Bytes

Versions: 1

Compression:

Stored size: 712 Bytes

Contents

# frozen_string_literal: true

module RubyJard
  module Commands
    # Command used to explore stacktrace.
    # Data attached in the throw:
    # * command: constant symbol (:up)
    # * pry: current context pry instance
    class UpCommand < Pry::ClassCommand
      group 'RubyJard'
      description 'Explore the frames above the current stopped line in the backtrace'

      match 'up'

      banner <<-BANNER
      Usage: up

      Explore the frames above the current stopped line in the backtrace.

      Examples:
        up
      BANNER

      def process
        throw :control_flow, command: :up, pry: pry_instance
      end
    end
  end
end

Pry::Commands.add_command(RubyJard::Commands::UpCommand)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ruby_jard-0.1.0 lib/ruby_jard/commands/up_command.rb