Sha256: c14364146cee52fb762ed15b8d82807a0a03571c4ed987c97ba5969ed843e818

Contents?: true

Size: 420 Bytes

Versions: 3

Compression:

Stored size: 420 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

3 entries across 3 versions & 1 rubygems

Version Path
rio-0.3.9 lib/rio/ftp/ftpfile.rb
rio-0.3.8 lib/rio/ftp/ftpfile.rb
rio-0.4.0 lib/rio/ftp/ftpfile.rb