Class: ZipList

Inherits:
Object show all
Defined in:
lib/zip/ziprequire.rb

Overview

:nodoc:all

Instance Method Summary (collapse)

Constructor Details

- (ZipList) initialize(zipFileList)



33
34
35
# File 'lib/zip/ziprequire.rb', line 33

def initialize(zipFileList)
    @zipFileList = zipFileList
end

Instance Method Details

- (Object) get_input_stream(entry, &aProc)

Raises:

  • (Errno::ENOENT)


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