Class: ZipFileGenerator

Inherits:
Object
  • Object
show all
Defined in:
lib/cocoapods-flutter/native/archive/zip_tool.rb

Instance Method Summary collapse

Constructor Details

#initialize(input_dir, entry, zipfile) ⇒ ZipFileGenerator

Initialize with the directory to zip and the location of the output archive.



18
19
20
21
22
23
# File 'lib/cocoapods-flutter/native/archive/zip_tool.rb', line 18

def initialize(input_dir, entry, zipfile)

  @input_dir = input_dir
  @zipfile = zipfile
  @entry = entry
end

Instance Method Details

#writeObject

Zip the input directory.



26
27
28
29
# File 'lib/cocoapods-flutter/native/archive/zip_tool.rb', line 26

def write
  entries = Dir.entries(@input_dir) - %w[. ..]
  write_entries entries, @entry, @zipfile
end