Class: Ucode::CodeChart::GapAnalyzer::Manifest
- Inherits:
-
Object
- Object
- Ucode::CodeChart::GapAnalyzer::Manifest
- Defined in:
- lib/ucode/code_chart/gap_analyzer/manifest.rb
Overview
Abstract manifest parser. Subclasses own ONE manifest schema
and expose a uniform {block_id => covered_codepoints} shape
to Ucode::CodeChart::GapAnalyzer.
Subclasses must implement #parse.
Direct Known Subclasses
Instance Method Summary collapse
-
#coverage_by_block ⇒ Hash{String=>Array<Integer>}
Block_id → array of codepoints the manifest's donor sources cover.
-
#initialize(path) ⇒ Manifest
constructor
A new instance of Manifest.
- #read_text ⇒ Object
-
#ucd_version ⇒ String
The UCD version declared in the manifest.
Constructor Details
#initialize(path) ⇒ Manifest
Returns a new instance of Manifest.
15 16 17 |
# File 'lib/ucode/code_chart/gap_analyzer/manifest.rb', line 15 def initialize(path) @path = Pathname.new(path) end |
Instance Method Details
#coverage_by_block ⇒ Hash{String=>Array<Integer>}
Returns block_id → array of codepoints the manifest's donor sources cover.
26 27 28 |
# File 'lib/ucode/code_chart/gap_analyzer/manifest.rb', line 26 def coverage_by_block raise NotImplementedError end |
#read_text ⇒ Object
31 32 33 34 35 |
# File 'lib/ucode/code_chart/gap_analyzer/manifest.rb', line 31 def read_text return @path.read unless @path.exist? @path.read end |
#ucd_version ⇒ String
Returns the UCD version declared in the manifest.
20 21 22 |
# File 'lib/ucode/code_chart/gap_analyzer/manifest.rb', line 20 def ucd_version raise NotImplementedError end |