Method: Rant::Archive::Rubyzip::ZipInputStream.open
- Defined in:
- lib/rant/archive/rubyzip.rb
.open(filename) ⇒ Object
Same as #initialize but if a block is passed the opened stream is passed to the block and closed when the block returns.
121 122 123 124 125 126 127 128 |
# File 'lib/rant/archive/rubyzip.rb', line 121 def ZipInputStream.open(filename) return new(filename) unless block_given? zio = new(filename) yield zio ensure zio.close if zio end |