Class: PryRemote::Server
- Inherits:
-
Object
- Object
- PryRemote::Server
- Defined in:
- lib/pry-nav/pry_remote_ext.rb
Instance Method Summary collapse
-
#run ⇒ Object
Override the call to Pry.start to save off current Server, pass a pry_remote flag so pry-nav knows this is a remote session, and not kill the server right away.
- #teardown_with_pry_nav ⇒ Object (also: #teardown)
Instance Method Details
#run ⇒ Object
Override the call to Pry.start to save off current Server, pass a pry_remote flag so pry-nav knows this is a remote session, and not kill the server right away
9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/pry-nav/pry_remote_ext.rb', line 9 def run if PryNav.current_remote_server raise 'Already running a pry-remote session!' else PryNav.current_remote_server = self end setup Pry.start @object, { :input => client.input_proxy, :output => client.output, :pry_remote => true } end |
#teardown_with_pry_nav ⇒ Object Also known as: teardown
26 27 28 29 |
# File 'lib/pry-nav/pry_remote_ext.rb', line 26 def teardown_with_pry_nav teardown_without_pry_nav PryNav.current_remote_server = nil end |