Sha256: 7ae1c17f192daa9aebfc95df7abc252bb962f49127b8a838f5ef85afa4116731
Contents?: true
Size: 1.1 KB
Versions: 17
Compression:
Stored size: 1.1 KB
Contents
# frozen_string_literal: true module Break::Pry module PryExtensions attr_accessor :__break_session__ def initialize(options={}) super(options) @__break_session__ = options[:__break_session__] end end end Pry.prepend Break::Pry::PryExtensions begin require 'pry-remote' module Break::Pry class << self attr_accessor :current_remote_server end module PryRemoteServerExtensions def initialize(*) Break::Pry.current_remote_server&.teardown super end def run return if Break::Pry.current_remote_server Break::Pry.current_remote_server = self setup Pry.start @object, @options.merge(input: client.input_proxy, output: client.output) end def teardown super ensure Break::Pry.current_remote_server = nil end end end # Hack for break works with pry_remote. # More details, see: https://github.com/gsamokovarov/break/issues/9 # PryRemote::Server.prepend Break::Pry::PryRemoteServerExtensions rescue LoadError # Do nothing if we cannot require pry-remote. end
Version data entries
17 entries across 17 versions & 1 rubygems