Class: Zip::FileSystem::ZipFsDirIterator
- Inherits:
-
Object
- Object
- Zip::FileSystem::ZipFsDirIterator
- Includes:
- Enumerable
- Defined in:
- lib/hotplate/gems/rubyzip-1.1.7/lib/zip/filesystem.rb
Overview
:nodoc:all
Instance Method Summary collapse
- #close ⇒ Object
- #each(&aProc) ⇒ Object
-
#initialize(arrayOfFileNames) ⇒ ZipFsDirIterator
constructor
A new instance of ZipFsDirIterator.
- #read ⇒ Object
- #rewind ⇒ Object
- #seek(anIntegerPosition) ⇒ Object
- #tell ⇒ Object
Methods included from Enumerable
Constructor Details
#initialize(arrayOfFileNames) ⇒ ZipFsDirIterator
Returns a new instance of ZipFsDirIterator.
515 516 517 518 |
# File 'lib/hotplate/gems/rubyzip-1.1.7/lib/zip/filesystem.rb', line 515 def initialize(arrayOfFileNames) @fileNames = arrayOfFileNames @index = 0 end |
Instance Method Details
#close ⇒ Object
520 521 522 |
# File 'lib/hotplate/gems/rubyzip-1.1.7/lib/zip/filesystem.rb', line 520 def close @fileNames = nil end |
#each(&aProc) ⇒ Object
524 525 526 527 |
# File 'lib/hotplate/gems/rubyzip-1.1.7/lib/zip/filesystem.rb', line 524 def each(&aProc) raise IOError, "closed directory" if @fileNames == nil @fileNames.each(&aProc) end |
#read ⇒ Object
529 530 531 532 |
# File 'lib/hotplate/gems/rubyzip-1.1.7/lib/zip/filesystem.rb', line 529 def read raise IOError, "closed directory" if @fileNames == nil @fileNames[(@index+=1)-1] end |
#rewind ⇒ Object
534 535 536 537 |
# File 'lib/hotplate/gems/rubyzip-1.1.7/lib/zip/filesystem.rb', line 534 def rewind raise IOError, "closed directory" if @fileNames == nil @index = 0 end |
#seek(anIntegerPosition) ⇒ Object
539 540 541 542 |
# File 'lib/hotplate/gems/rubyzip-1.1.7/lib/zip/filesystem.rb', line 539 def seek(anIntegerPosition) raise IOError, "closed directory" if @fileNames == nil @index = anIntegerPosition end |
#tell ⇒ Object
544 545 546 547 |
# File 'lib/hotplate/gems/rubyzip-1.1.7/lib/zip/filesystem.rb', line 544 def tell raise IOError, "closed directory" if @fileNames == nil @index end |