Sha256: 50c1db1048b73102213a89c899df248ffb8cd9c2df79c1de800e9e1389b35c77
Contents?: true
Size: 345 Bytes
Versions: 1
Compression:
Stored size: 345 Bytes
Contents
require 'zlib' require 'archive/tar/minitar' module Downlow class TarGz < Extractor handles(/\.tar\.gz$/, :file_only => true) def extract destination.mkpath tgz = ::Zlib::GzipReader.new(File.open(path, 'rb')) ::Archive::Tar::Minitar.unpack(tgz, destination.to_s) @final_path = destination end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
downlow-0.1.4 | lib/downlow/extractors/tar_gz.rb |