Sha256: ff64267d5d0474f25f252006fd18cdead7894d3a1b8cf3a5b4e2161d15ca3d41
Contents?: true
Size: 610 Bytes
Versions: 15
Compression:
Stored size: 610 Bytes
Contents
require "zip" module Fontist module Import module Extractors class ZipExtractor < Extractor def extract dir = Dir.mktmpdir extract_zip(@archive, dir) dir end def format "zip" end private def extract_zip(archive, dir) Zip::File.open(archive) do |zip_file| zip_file.each do |entry| path = File.join(dir, entry.name) FileUtils.mkdir_p(File.dirname(path)) entry.extract(path) end end end end end end end
Version data entries
15 entries across 15 versions & 1 rubygems