Download image if not exists on the system
This commit is contained in:
parent
2840b6e221
commit
f8d67e621b
3 changed files with 23 additions and 5 deletions
|
|
@ -5,6 +5,7 @@ require 'fileutils'
|
|||
require 'open-uri'
|
||||
|
||||
module Downloader
|
||||
# brew install gnu-tar
|
||||
# use_cache => save in the home and return path to it
|
||||
# forced => download even if the file exists in the cache, saves to chace if use_cache == true
|
||||
def self.get(url, use_cache = true, forced = false)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue