Class: Snatch::TransferHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/snatch/handler.rb

Instance Method Summary collapse

Instance Method Details

#on_close(downloader, file) ⇒ Object



7
8
9
# File 'lib/snatch/handler.rb', line 7

def on_close(downloader, file)
  puts "ftp: finished downloading #{File.basename(file.remote)}"
end

#on_finish(downloader) ⇒ Object



11
12
13
# File 'lib/snatch/handler.rb', line 11

def on_finish(downloader)
  puts "ftp: file saved."
end

#on_open(downloader, file) ⇒ Object



3
4
5
# File 'lib/snatch/handler.rb', line 3

def on_open(downloader, file)
  puts "ftp: downloading: #{file.remote} -> #{file.local}"
end