Class: Zim::Directory
- Inherits:
-
Array
- Object
- Array
- Zim::Directory
- Defined in:
- lib/zim/structs.rb
Instance Method Summary collapse
-
#initialize(f, count, clazz) ⇒ Directory
constructor
A new instance of Directory.
Constructor Details
#initialize(f, count, clazz) ⇒ Directory
Returns a new instance of Directory.
58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/zim/structs.rb', line 58 def initialize(f, count, clazz) super() poses = Array.new count.times do pos = f.read_int64 poses << pos end poses.each do |pos| f.seek(pos) self << clazz.new(f) end end |