Class: Excavate::Extractors::TarExtractor
- Defined in:
- lib/excavate/extractors/tar_extractor.rb
Instance Method Summary collapse
Methods inherited from Extractor
Constructor Details
This class inherits a constructor from Excavate::Extractors::Extractor
Instance Method Details
#extract(target) ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/excavate/extractors/tar_extractor.rb', line 6 def extract(target) File.open(@archive, "rb") do |archive_file| Gem::Package::TarReader.new(archive_file) do |tar| tar.each do |tarfile| save_tar_file(tarfile, target) end end end end |