Class: Excavate::Extractors::CabExtractor

Inherits:
Extractor
  • Object
show all
Defined in:
lib/excavate/extractors/cab_extractor.rb

Instance Method Summary collapse

Methods inherited from Extractor

#initialize

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
15
16
# File 'lib/excavate/extractors/cab_extractor.rb', line 6

def extract(target)
  open_cab(@archive) do |decompressor, cab|
    file = cab.files

    while file
      path = File.join(target, file.filename)
      decompressor.extract(file, path)
      file = file.next
    end
  end
end