Method: Confer::Connection#start

Defined in:
lib/confer/connection.rb

#start(&block) ⇒ Object

Public: Opens a connection to the remote host and yields self to the given block for further interaction. The connection will be closed once the block has executed.

block - The block to yield to.



53
54
55
56
57
58
# File 'lib/confer/connection.rb', line 53

def start(&block)
  Net::SSH.start(self.host, self.user, self.config) do |ssh|
    @ssh = ssh
    yield(self)
  end
end