wrap

Zlib::GzipReader.wrap(io, ...) { |gz| ... }
Zlib::GzipWriter.wrap(io, ...) { |gz| ... }
Class Public methods

Creates a GzipReader or GzipWriter associated with io, passing in any necessary extra options, and executes the block with the newly created object just like File.open.

The GzipFile object will be closed automatically after executing the block. If you want to keep the associated IO object open, you may call #finish method in the block.

doc_ruby_on_rails
2015-06-14 14:49:19
Comments
Leave a Comment

Please login to continue.