Module: Annal::Fetch
- Defined in:
- lib/annal/fetch.rb,
lib/annal/fetch/net_file.rb,
lib/annal/fetch/local_file.rb
Defined Under Namespace
Classes: LocalFile, NetFile
Class Method Summary
collapse
Class Method Details
.new(file_identifier) ⇒ Object
6
7
8
9
10
11
12
13
14
15
|
# File 'lib/annal/fetch.rb', line 6
def self.new(file_identifier)
case file_identifier
when File
LocalFile.new(file_identifier)
when %r(https?://)
NetFile.new(file_identifier)
else
LocalFile.new(file_identifier)
end
end
|