Class: PryRemote::Server

Inherits:
Object
  • Object
show all
Defined in:
lib/pry-byebug/pry_remote_ext.rb

Overview

Overrides PryRemote::Server

Instance Method Summary collapse

Instance Method Details

#runObject

Override the call to Pry.start to save off current Server, and not teardown the server right after Pry.start finishes.



14
15
16
17
18
19
20
21
22
# File 'lib/pry-byebug/pry_remote_ext.rb', line 14

def run
  raise("Already running a pry-remote session!") if
    PryByebug.current_remote_server

  PryByebug.current_remote_server = self

  setup
  Pry.start @object, input: client.input_proxy, output: client.output
end

#teardown_with_pry_byebugObject Also known as: teardown



28
29
30
31
32
33
34
# File 'lib/pry-byebug/pry_remote_ext.rb', line 28

def teardown_with_pry_byebug
  return if @torn

  teardown_without_pry_byebug
  PryByebug.current_remote_server = nil
  @torn = true
end