class Rake::FtpUploader

def connect(path, host, account, password)

When the block is complete, close the uploader.
Create an uploader and pass it to the given block as +up+.
def connect(path, host, account, password)
  up = self.new(path, host, account, password)
  begin
    yield(up)
  ensure
    up.close
  end
end