Class: Suvii::Extract::Zip
- Inherits:
-
Suvii::Extract
- Object
- Suvii::Extract
- Suvii::Extract::Zip
- Defined in:
- lib/suvii/extract/zip.rb
Overview
Constant Summary
Constants inherited from Suvii::Extract
TARGZ_RE, UnknownFormatError, ZIP_RE
Instance Attribute Summary
Attributes inherited from Suvii::Extract
Instance Method Summary collapse
-
#extract_to(destination) ⇒ String
Performs archive extraction.
Methods inherited from Suvii::Extract
Constructor Details
This class inherits a constructor from Suvii::Extract
Instance Method Details
#extract_to(destination) ⇒ String
Performs archive extraction.
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/suvii/extract/zip.rb', line 7 def extract_to(destination) ::Zip::File.open(source) do |zip_file| zip_file.each do |entry| path = path_with_stripped_components(entry.name) destination_file = File.join(destination, path) entry.extract(destination_file) end end destination end |