Class: Ucode::Coordinator::Indices
- Inherits:
-
Struct
- Object
- Struct
- Ucode::Coordinator::Indices
- Defined in:
- lib/ucode/coordinator/indices.rb
Overview
Bag of pre-built indices consumed by the per-codepoint enrichment
pass. Every field is a frozen-shaped collection that is read-only
after build_indices returns: range files land in sorted Arrays
(bsearched by range_first); per-cp files land in flat Hashes keyed
by Integer codepoint or by "U+XXXX" id string.
Defined with keyword_init: true so the Coordinator's Indices.new
call reads as a self-documenting catalogue of every parsed file —
adding a new index is one keyword arg here, one builder call in
Coordinator#build_indices, and one assignment in #enrich.
The relationship enumerator (#each_relationship) is the seam the
Repo uses to write per-property relationship tables without knowing
which Struct field carries which data.
Instance Attribute Summary collapse
-
#bidi_brackets ⇒ Object
Returns the value of attribute bidi_brackets.
-
#bidi_mirroring ⇒ Object
Returns the value of attribute bidi_mirroring.
-
#binary_properties ⇒ Object
Returns the value of attribute binary_properties.
-
#blocks ⇒ Object
Returns the value of attribute blocks.
-
#case_folding ⇒ Object
Returns the value of attribute case_folding.
-
#cjk_radicals ⇒ Object
Returns the value of attribute cjk_radicals.
-
#derived_age ⇒ Object
Returns the value of attribute derived_age.
-
#east_asian_width ⇒ Object
Returns the value of attribute east_asian_width.
-
#emoji_properties ⇒ Object
Returns the value of attribute emoji_properties.
-
#extra_binary_properties ⇒ Object
Returns the value of attribute extra_binary_properties.
-
#grapheme_break ⇒ Object
Returns the value of attribute grapheme_break.
-
#hangul_syllable_type ⇒ Object
Returns the value of attribute hangul_syllable_type.
-
#indic_positional ⇒ Object
Returns the value of attribute indic_positional.
-
#indic_syllabic ⇒ Object
Returns the value of attribute indic_syllabic.
-
#line_break ⇒ Object
Returns the value of attribute line_break.
-
#name_aliases ⇒ Object
Returns the value of attribute name_aliases.
-
#names_list ⇒ Object
Returns the value of attribute names_list.
-
#property_value_aliases ⇒ Object
Returns the value of attribute property_value_aliases.
-
#script_extensions ⇒ Object
Returns the value of attribute script_extensions.
-
#scripts ⇒ Object
Returns the value of attribute scripts.
-
#sentence_break ⇒ Object
Returns the value of attribute sentence_break.
-
#special_casing ⇒ Object
Returns the value of attribute special_casing.
-
#standardized_variants ⇒ Object
Returns the value of attribute standardized_variants.
-
#unihan ⇒ Object
Returns the value of attribute unihan.
-
#vertical_orientation ⇒ Object
Returns the value of attribute vertical_orientation.
-
#word_break ⇒ Object
Returns the value of attribute word_break.
Instance Method Summary collapse
-
#each_relationship {|slug, records| ... } ⇒ Enumerator
Yield (slug, records) for each relationship table.
Instance Attribute Details
#bidi_brackets ⇒ Object
Returns the value of attribute bidi_brackets
35 36 37 |
# File 'lib/ucode/coordinator/indices.rb', line 35 def bidi_brackets @bidi_brackets end |
#bidi_mirroring ⇒ Object
Returns the value of attribute bidi_mirroring
35 36 37 |
# File 'lib/ucode/coordinator/indices.rb', line 35 def bidi_mirroring @bidi_mirroring end |
#binary_properties ⇒ Object
Returns the value of attribute binary_properties
35 36 37 |
# File 'lib/ucode/coordinator/indices.rb', line 35 def binary_properties @binary_properties end |
#blocks ⇒ Object
Returns the value of attribute blocks
35 36 37 |
# File 'lib/ucode/coordinator/indices.rb', line 35 def blocks @blocks end |
#case_folding ⇒ Object
Returns the value of attribute case_folding
35 36 37 |
# File 'lib/ucode/coordinator/indices.rb', line 35 def case_folding @case_folding end |
#cjk_radicals ⇒ Object
Returns the value of attribute cjk_radicals
35 36 37 |
# File 'lib/ucode/coordinator/indices.rb', line 35 def cjk_radicals @cjk_radicals end |
#derived_age ⇒ Object
Returns the value of attribute derived_age
35 36 37 |
# File 'lib/ucode/coordinator/indices.rb', line 35 def derived_age @derived_age end |
#east_asian_width ⇒ Object
Returns the value of attribute east_asian_width
35 36 37 |
# File 'lib/ucode/coordinator/indices.rb', line 35 def east_asian_width @east_asian_width end |
#emoji_properties ⇒ Object
Returns the value of attribute emoji_properties
35 36 37 |
# File 'lib/ucode/coordinator/indices.rb', line 35 def emoji_properties @emoji_properties end |
#extra_binary_properties ⇒ Object
Returns the value of attribute extra_binary_properties
35 36 37 |
# File 'lib/ucode/coordinator/indices.rb', line 35 def extra_binary_properties @extra_binary_properties end |
#grapheme_break ⇒ Object
Returns the value of attribute grapheme_break
35 36 37 |
# File 'lib/ucode/coordinator/indices.rb', line 35 def grapheme_break @grapheme_break end |
#hangul_syllable_type ⇒ Object
Returns the value of attribute hangul_syllable_type
35 36 37 |
# File 'lib/ucode/coordinator/indices.rb', line 35 def hangul_syllable_type @hangul_syllable_type end |
#indic_positional ⇒ Object
Returns the value of attribute indic_positional
35 36 37 |
# File 'lib/ucode/coordinator/indices.rb', line 35 def indic_positional @indic_positional end |
#indic_syllabic ⇒ Object
Returns the value of attribute indic_syllabic
35 36 37 |
# File 'lib/ucode/coordinator/indices.rb', line 35 def indic_syllabic @indic_syllabic end |
#line_break ⇒ Object
Returns the value of attribute line_break
35 36 37 |
# File 'lib/ucode/coordinator/indices.rb', line 35 def line_break @line_break end |
#name_aliases ⇒ Object
Returns the value of attribute name_aliases
35 36 37 |
# File 'lib/ucode/coordinator/indices.rb', line 35 def name_aliases @name_aliases end |
#names_list ⇒ Object
Returns the value of attribute names_list
35 36 37 |
# File 'lib/ucode/coordinator/indices.rb', line 35 def names_list @names_list end |
#property_value_aliases ⇒ Object
Returns the value of attribute property_value_aliases
35 36 37 |
# File 'lib/ucode/coordinator/indices.rb', line 35 def property_value_aliases @property_value_aliases end |
#script_extensions ⇒ Object
Returns the value of attribute script_extensions
35 36 37 |
# File 'lib/ucode/coordinator/indices.rb', line 35 def script_extensions @script_extensions end |
#scripts ⇒ Object
Returns the value of attribute scripts
35 36 37 |
# File 'lib/ucode/coordinator/indices.rb', line 35 def scripts @scripts end |
#sentence_break ⇒ Object
Returns the value of attribute sentence_break
35 36 37 |
# File 'lib/ucode/coordinator/indices.rb', line 35 def sentence_break @sentence_break end |
#special_casing ⇒ Object
Returns the value of attribute special_casing
35 36 37 |
# File 'lib/ucode/coordinator/indices.rb', line 35 def special_casing @special_casing end |
#standardized_variants ⇒ Object
Returns the value of attribute standardized_variants
35 36 37 |
# File 'lib/ucode/coordinator/indices.rb', line 35 def standardized_variants @standardized_variants end |
#unihan ⇒ Object
Returns the value of attribute unihan
35 36 37 |
# File 'lib/ucode/coordinator/indices.rb', line 35 def unihan @unihan end |
#vertical_orientation ⇒ Object
Returns the value of attribute vertical_orientation
35 36 37 |
# File 'lib/ucode/coordinator/indices.rb', line 35 def vertical_orientation @vertical_orientation end |
#word_break ⇒ Object
Returns the value of attribute word_break
35 36 37 |
# File 'lib/ucode/coordinator/indices.rb', line 35 def word_break @word_break end |
Instance Method Details
#each_relationship {|slug, records| ... } ⇒ Enumerator
Yield (slug, records) for each relationship table. The seam between "what the Coordinator indexed" and "what the Repo writes" lives here — Repo never names a Struct field directly.
72 73 74 75 76 77 78 |
# File 'lib/ucode/coordinator/indices.rb', line 72 def each_relationship(&block) return enum_for(:each_relationship) unless block_given? RELATIONSHIPS.each do |slug, field| yield(slug, public_send(field)) end end |