Method: Vimrunner::Server#connect!

Defined in:
lib/vimrunner/server.rb

#connect!(options = {}) ⇒ Object

Public: Connects to the running server by name, blocking if need be. Raises a TimeoutError if no server was found in the given time in seconds.

options - An optional Hash. For now, only used for specifying a timeout

(default: {}):

:timeout - The Integer timeout to wait for a running server
           (default: 5).

Returns a new Client instance initialized with this Server.



100
101
102
103
104
105
106
# File 'lib/vimrunner/server.rb', line 100

def connect!(options = {})
  wait_until_running(options[:timeout] || 5)

  client = new_client
  client.source(VIMRUNNER_RC)
  client
end