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 instantiate_ftp_per_options(options)
    (options[:ftps] ? DoubleBagFTPS.new : Net::FTP.new).tap do |obj|
      if options[:ftps]
        if options[:ftps_mode]
          obj.ftps_mode = options[:ftps_mode]
        end
        if options[:ssl_context_params]
          obj.ssl_context = DoubleBagFTPS.create_ssl_context(
            options[:ssl_context_params]
          )
        end
      end
      obj.passive = options[:passive]
    end
  end
def instantiate_ftp_per_options ( options ) ( options [ :ftps ] ? DoubleBagFTPS . new : Net :: FTP . new ) . tap do | obj | if options [ :ftps ] if options [ :ftps_mode ] obj . ftps_mode = options [ :ftps_mode ] end if options [ :ssl_context_params ] obj . ssl_context = DoubleBagFTPS . create_ssl_context ( options [ :ssl_context_params ] ) end end obj . passive = options [ :passive ] 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 .
options
<not_specific>