Class: Anyfetch::FTP

Inherits:
Object
  • Object
show all
Defined in:
lib/anyfetch/ftp.rb

Instance Method Summary collapse

Constructor Details

#initialize(uri, options = {}) ⇒ FTP



5
6
7
8
9
# File 'lib/anyfetch/ftp.rb', line 5

def initialize(uri, options = {})
  @uri = uri
  @options = options
  setup_auth
end

Instance Method Details

#openObject



11
12
13
14
15
# File 'lib/anyfetch/ftp.rb', line 11

def open
  file = super(@uri)
  file.extend(OriginalFilename::ContentType)
  file
end