Class: Pack::Unpacker
- Inherits:
-
Object
- Object
- Pack::Unpacker
- Defined in:
- lib/pack/unpacker.rb
Instance Method Summary collapse
-
#initialize(database, reader, stream, progress) ⇒ Unpacker
constructor
A new instance of Unpacker.
- #process_pack ⇒ Object
Constructor Details
#initialize(database, reader, stream, progress) ⇒ Unpacker
Returns a new instance of Unpacker.
6 7 8 9 10 11 12 |
# File 'lib/pack/unpacker.rb', line 6 def initialize(database, reader, stream, progress) @database = database @reader = reader @stream = stream @progress = progress @offsets = {} end |
Instance Method Details
#process_pack ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/pack/unpacker.rb', line 14 def process_pack @progress&.start("Unpacking objects", @reader.count) @reader.count.times do process_record @progress&.tick(@stream.offset) end @progress&.stop @stream.verify_checksum end |