Class: Anyfetch::File

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

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of File.



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

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

Instance Method Details

#openObject



10
11
12
13
# File 'lib/anyfetch/file.rb', line 10

def open
  file = ::File.open(@uri.path)
  file.extend(OriginalFilename::Path)
end