I posted these on comp.lang.ruby, but realized that this is
probably the better place for these.
It would be really helpful to see an example of
iterating through a zip archive and extracting all the
entries. The documentation appears to lack one for this
very common unzip operation.
A design issue. I would have thought it natural for
"extract" to default the second argument to "./entry.name"
so that in the most common case, it would not need to be
supplied.
Another design issue. It would seem more natural to
me to make "extract" a method of the Zip::ZipEntry class,
which would defult to extracting itself into the current
directory with the entry name. That way, an unzip
operation would become:
Zip::ZipFile.open("archive.zip").each { |entry|
entry.extract
}
Extraction now requires an awkward reference to the
Zip::ZipFile object
inside the block.
My two cents. Thanks for the great library, and keep up
the good work.
Anonymous