Sha256: a2f7e74dd60a82e0ecb1d7e0860d49a4e082d60a13537dc6a2feb4653b5f18ca

Contents?: true

Size: 400 Bytes

Versions: 5

Compression:

Stored size: 400 Bytes

Contents

require 'tempfile'
require 'delegate'
module RIO
  module FTP
    class FTPFile < DelegateClass( ::Tempfile )
      def initialize(remote_path, netftp)
        @remote_path = remote_path
        @netftp = netftp
        @ftpfile = ::Tempfile.new('ftpfile')
        super(@ftpfile)
      end
      def close()
        super
        @netftp.put(path(),@remote_path)
      end
      
    end
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
rio-0.6.0 lib/rio/ftp/ftpfile.rb
wishdev-rio-0.4.3.1 lib/rio/ftp/ftpfile.rb
rio-0.5.1 lib/rio/ftp/ftpfile.rb
rio-0.4.1 lib/rio/ftp/ftpfile.rb
rio-0.4.2 lib/rio/ftp/ftpfile.rb