Method: XFTP::Session::Base#start

Defined in:
lib/xftp/session/base.rb

#start(&callback) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Opens a new connection, evaluates the given block and closes the connection

Parameters:

  • callback (Proc)

    the callback to operate on a connection session



25
26
27
28
29
30
31
# File 'lib/xftp/session/base.rb', line 25

def start(&callback)
  log 'starting'
  open
  evaluate(&callback)
  close
  log 'done'
end