Sha256: 29984c796c6c51c66ae82c3622d669a7b8f8fa564abcba64f3d62cef54218d7e

Contents?: true

Size: 336 Bytes

Versions: 1

Compression:

Stored size: 336 Bytes

Contents

require 'zlib'
require 'archive/tar/minitar'

module Downlow
  class TarGz < Extractor
    
    handles(/\.tar\.gz$/)
    
    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.0 lib/downlow/extractors/tar_gz.rb