Class: RIO::FTP::FTPFile

Inherits:
Tempfile
  • Object
show all
Defined in:
lib/rio/ftp/ftpfile.rb

Instance Method Summary collapse

Constructor Details

#initialize(remote_path, netftp) ⇒ FTPFile

Returns a new instance of FTPFile.



7
8
9
10
11
12
# File 'lib/rio/ftp/ftpfile.rb', line 7

def initialize(remote_path, netftp)
  @remote_path = remote_path
  @netftp = netftp
  @ftpfile = ::Tempfile.new('ftpfile')
  super(@ftpfile)
end

Instance Method Details

#closeObject



13
14
15
16
# File 'lib/rio/ftp/ftpfile.rb', line 13

def close()
  super
  @netftp.put(path(),@remote_path)
end