lib/niftp.rb
# Connects to the +host+ FTP server, executes the given block then closes
# the connection.
#
# See the README for available options and examples.
Connects to the +host+ FTP server, executes the given block then closes
the connection.

See the README for available options and examples.
Connects to the + host + FTP server executes the given block then closes the connection . See the README for available options and examples .
def ftp(host, options = {}, &block)
    options = default_options.merge(options)
    raise "The :tries option must be > 0." if options[:tries] < 1
    Retryable.retryable(retryable_options(options)) do
      ftp = instantiate_ftp_per_options(options)
      begin
        login_with_timeout(ftp, host, options)
        yield ftp if ftp && block_given?
      ensure
        ftp.close if ftp
      end
    end
  end
def ftp ( host , options = { } , & block ) options = default_options . merge ( options ) raise "The :tries option must be > 0." if options [ :tries ] < 1 Retryable . retryable ( retryable_options ( options ) ) do ftp = instantiate_ftp_per_options ( options ) begin login_with_timeout ( ftp , host , options ) yield ftp if ftp && block_given? ensure ftp . close if ftp end end end
Connects to the +host+ FTP server, executes the given block then closes
the connection.
Connects to the + host + FTP server executes the given block then closes the connection .
host
<not_specific>
options
<not_specific>
block
<not_specific>