Module: Fontisan::Ucd::Downloader
- Defined in:
- lib/fontisan/ucd/downloader.rb
Overview
Fetches UCDXML zips from unicode.org and unpacks them into the cache.
Single entry point: Downloader.download(version, force:).
Idempotent unless force: true. Returns the path to the unpacked
ucd.all.flat.xml.
Class Method Summary collapse
-
.download(version, force: false) ⇒ Pathname
Download and unpack UCDXML for
version.
Class Method Details
.download(version, force: false) ⇒ Pathname
Download and unpack UCDXML for version.
27 28 29 30 31 32 33 34 35 |
# File 'lib/fontisan/ucd/downloader.rb', line 27 def download(version, force: false) target = CacheManager.ucdxml_path(version) return target if target.exist? && !force CacheManager.ensure_version_dir!(version) zip_data = fetch_zip(version) extract_xml(zip_data, target) target end |