Download image if not exists on the system

This commit is contained in:
Artur Gurgul 2025-08-14 08:03:10 +02:00
parent 2840b6e221
commit f8d67e621b
3 changed files with 23 additions and 5 deletions

View file

@ -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)