Class: ZipFileGenerator
- Inherits:
-
Object
- Object
- ZipFileGenerator
- Defined in:
- lib/cocoapods-flutter/native/archive/zip_tool.rb
Instance Method Summary collapse
-
#initialize(input_dir, entry, zipfile) ⇒ ZipFileGenerator
constructor
Initialize with the directory to zip and the location of the output archive.
-
#write ⇒ Object
Zip the input directory.
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
#write ⇒ Object
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 |