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.



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

def run
  fail('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



24
25
26
27
28
29
30
# File 'lib/pry-byebug/pry_remote_ext.rb', line 24

def teardown_with_pry_byebug
  return if @torn

  teardown_without_pry_byebug
  PryByebug.current_remote_server = nil
  @torn = true
end