Class: Clients::FtpClient

Inherits:
Object
  • Object
show all
Defined in:
lib/clients/ftp_client.rb

Instance Method Summary collapse

Instance Method Details

#get(url, &chunk_block) ⇒ Object



7
8
9
10
11
12
13
14
15
# File 'lib/clients/ftp_client.rb', line 7

def get(url, &chunk_block)
  uri = Addressable::URI.parse url

  Net::FTP.open(uri.host) do |ftp|
    ftp.passive = true
    ftp.
    ftp.getbinaryfile UrlDecoder.decode(uri.path), nil, &chunk_block
  end
end