Sha256: dca85450cd6d4e8b854f8d3db507a75cd2bc595c06b1c83c669960968490231b

Contents?: true

Size: 553 Bytes

Versions: 1

Compression:

Stored size: 553 Bytes

Contents

require "pry-remote"

# Example:
#
#     require 'pry-remote-auto'
#     
#     class Foo
#       def initialize(x, y)
#         binding.remote_pry
#       end
#     end
#     
#     Foo.new 10, 20
#
class Object
  def remote_pry_with_auto_launch(*args)
    Thread.start do
      sleep 1
      system 'osascript', '-e', 'tell application "Terminal" to do script "pry-remote"'
    end
    remote_pry_without_auto_launch(*args)
  end
  alias_method :remote_pry_without_auto_launch, :remote_pry
  alias_method :remote_pry, :remote_pry_with_auto_launch
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pry-remote-auto-1.0.0 lib/pry-remote-auto.rb