deivid-rodriguez/pry-byebug

View on GitHub
lib/pry-byebug/commands/exit_all.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
# frozen_string_literal: true

require "pry/commands/exit_all"

module PryByebug
  #
  # Exit pry REPL with Byebug.stop
  #
  class ExitAllCommand < Pry::Command::ExitAll
    def process
      super
    ensure
      Byebug.stop if Byebug.stoppable?
    end
  end
end

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