Class: Ole::Storage::AllocationTable::Big
- Inherits:
-
Ole::Storage::AllocationTable
- Object
- Array
- Ole::Storage::AllocationTable
- Ole::Storage::AllocationTable::Big
- Defined in:
- lib/ole/storage.rb
Constant Summary
Constants inherited from Ole::Storage::AllocationTable
Instance Attribute Summary
Attributes inherited from Ole::Storage::AllocationTable
Instance Method Summary collapse
-
#blocks_to_ranges(blocks, size) ⇒ Object
Big blocks are kind of -1 based, in order to not clash with the header.
-
#initialize(*args) ⇒ Big
constructor
A new instance of Big.
Methods inherited from Ole::Storage::AllocationTable
#[]=, #chain, #free_block, #load, #open, #ranges, #read, #resize_chain, #to_s, #truncate, #truncate!
Constructor Details
#initialize(*args) ⇒ Big
Returns a new instance of Big.
591 592 593 594 595 |
# File 'lib/ole/storage.rb', line 591 def initialize(*args) super @block_size = 1 << @ole.header.b_shift @io = @ole.io end |
Instance Method Details
#blocks_to_ranges(blocks, size) ⇒ Object
Big blocks are kind of -1 based, in order to not clash with the header.
598 599 600 |
# File 'lib/ole/storage.rb', line 598 def blocks_to_ranges blocks, size super blocks.map { |b| b + 1 }, size end |