Class: Zip::ZipFileSystem::ZipFsDirIterator
- Inherits:
-
Object
- Object
- Zip::ZipFileSystem::ZipFsDirIterator
- Includes:
- Enumerable
- Defined in:
- lib/zip/zipfilesystem.rb
Overview
:nodoc:all
Instance Method Summary (collapse)
- - (Object) close
- - (Object) each(&aProc)
-
- (ZipFsDirIterator) initialize(arrayOfFileNames)
constructor
A new instance of ZipFsDirIterator.
- - (Object) read
- - (Object) rewind
- - (Object) seek(anIntegerPosition)
- - (Object) tell
Methods included from Enumerable
Constructor Details
- (ZipFsDirIterator) initialize(arrayOfFileNames)
A new instance of ZipFsDirIterator
498 499 500 501 |
# File 'lib/zip/zipfilesystem.rb', line 498 def initialize(arrayOfFileNames) @fileNames = arrayOfFileNames @index = 0 end |
Instance Method Details
- (Object) close
503 504 505 |
# File 'lib/zip/zipfilesystem.rb', line 503 def close @fileNames = nil end |
- (Object) each(&aProc)
507 508 509 510 |
# File 'lib/zip/zipfilesystem.rb', line 507 def each(&aProc) raise IOError, "closed directory" if @fileNames == nil @fileNames.each(&aProc) end |
- (Object) read
512 513 514 515 |
# File 'lib/zip/zipfilesystem.rb', line 512 def read raise IOError, "closed directory" if @fileNames == nil @fileNames[(@index+=1)-1] end |
- (Object) rewind
517 518 519 520 |
# File 'lib/zip/zipfilesystem.rb', line 517 def rewind raise IOError, "closed directory" if @fileNames == nil @index = 0 end |
- (Object) seek(anIntegerPosition)
522 523 524 525 |
# File 'lib/zip/zipfilesystem.rb', line 522 def seek(anIntegerPosition) raise IOError, "closed directory" if @fileNames == nil @index = anIntegerPosition end |
- (Object) tell
527 528 529 530 |
# File 'lib/zip/zipfilesystem.rb', line 527 def tell raise IOError, "closed directory" if @fileNames == nil @index end |