Class: Downlow::TarGz
- Defined in:
- lib/downlow/extractors/tar_gz.rb
Instance Attribute Summary
Attributes inherited from Extractor
#destination, #final_path, #options, #path, #tmp_dir
Instance Method Summary collapse
Methods inherited from Extractor
extract, #extracted?, extractor_for, handles, #initialize
Constructor Details
This class inherits a constructor from Downlow::Extractor
Instance Method Details
#extract ⇒ Object
9 10 11 12 13 14 |
# File 'lib/downlow/extractors/tar_gz.rb', line 9 def extract destination.mkpath tgz = ::Zlib::GzipReader.new(File.open(path, 'rb')) ::Archive::Tar::Minitar.unpack(tgz, destination.to_s) @final_path = destination end |