Module: FetchIfUrl
- Defined in:
- lib/fetch_if_url.rb,
lib/fetch_if_url/version.rb
Defined Under Namespace
Classes: Error
Constant Summary collapse
- VERSION =
'0.1.0'
Class Method Summary collapse
Class Method Details
.fetch_if_url(path, dest: '/tmp') ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/fetch_if_url.rb', line 10 def fetch_if_url(path, dest: '/tmp') if on_network?(path) download(path, dest) else # do nothing if local file path end end |