Sha256: 77fc26bcc92a99638b84db6d8dac6ff3a353bdb961fb7b32fb67a5f4f235d234

Contents?: true

Size: 329 Bytes

Versions: 3

Compression:

Stored size: 329 Bytes

Contents

require 'zip/zip'

module Downlow
  class Zip < Extractor
    
    handles(/\.zip$/, :file_only => true)
    
    def extract
      ::Zip::ZipFile.foreach(path) do |file|
        path = destination + file.name
        path.dirname.mkpath
        file.extract(path)
      end
      @final_path = destination
    end
    
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
downlow-0.1.3 lib/downlow/extractors/zip.rb
downlow-0.1.2 lib/downlow/extractors/zip.rb
downlow-0.1.1 lib/downlow/extractors/zip.rb