Class: Cabriolet::OffsetCalculator
- Inherits:
-
Object
- Object
- Cabriolet::OffsetCalculator
- Defined in:
- lib/cabriolet/offset_calculator.rb
Overview
Abstract base class for offset calculators
Single responsibility: Calculate file positions within archive. Strategy pattern: Different formats implement different calculation strategies.
Subclasses must implement:
-
calculate(structure) - Returns hash of offsets
Direct Known Subclasses
Instance Method Summary collapse
-
#calculate(structure) ⇒ Hash
Calculate all offsets in archive structure.
Instance Method Details
#calculate(structure) ⇒ Hash
Calculate all offsets in archive structure
24 25 26 27 |
# File 'lib/cabriolet/offset_calculator.rb', line 24 def calculate(structure) raise NotImplementedError, "#{self.class.name} must implement calculate(structure)" end |