Class: ZipList
Overview
:nodoc:all
Instance Method Summary collapse
- #get_input_stream(entry, &aProc) ⇒ Object
-
#initialize(zipFileList) ⇒ ZipList
constructor
A new instance of ZipList.
Constructor Details
#initialize(zipFileList) ⇒ ZipList
Returns a new instance of ZipList.
33 34 35 |
# File 'lib/zip/ziprequire.rb', line 33 def initialize(zipFileList) @zipFileList = zipFileList end |
Instance Method Details
#get_input_stream(entry, &aProc) ⇒ Object
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/zip/ziprequire.rb', line 37 def get_input_stream(entry, &aProc) @zipFileList.each { |zfName| Zip::ZipFile.open(zfName) { |zf| begin return zf.get_input_stream(entry, &aProc) rescue Errno::ENOENT end } } raise Errno::ENOENT, "No matching entry found in zip files '#{@zipFileList.join(', ')}' "+ " for '#{entry}'" end |