Module: Ucode::Coordinator::Enrichment
- Defined in:
- lib/ucode/coordinator/enrichment.rb,
lib/ucode/coordinator/enrichment/cjk.rb,
lib/ucode/coordinator/enrichment/bidi.rb,
lib/ucode/coordinator/enrichment/emoji.rb,
lib/ucode/coordinator/enrichment/indic.rb,
lib/ucode/coordinator/enrichment/names.rb,
lib/ucode/coordinator/enrichment/binary.rb,
lib/ucode/coordinator/enrichment/casing.rb,
lib/ucode/coordinator/enrichment/display.rb,
lib/ucode/coordinator/enrichment/identity.rb,
lib/ucode/coordinator/enrichment/segmentation.rb
Overview
Registry of per-codepoint enrichment concerns. Each module under Enrichment owns one slice of the UCD/Unihan merge: Script, Bidi, Casing, Names, CJK, Display, Segmentation, Indic, Emoji, Binary.
The registry is an ordered Array of modules. #enrich
iterates it, calling enrich(cp, indices) on each. New UCD
properties land as a new module + one line in REGISTRY.
Each module is pure: it reads from Indices and mutates the CodePoint model. Range lookups go through RangeLookup.
Defined Under Namespace
Modules: Bidi, Binary, CJK, Casing, Display, Emoji, Identity, Indic, Names, Segmentation
Constant Summary collapse
- REGISTRY =
Order matters only for determinism — each module sets disjoint fields on the CodePoint model. Preserved from the original flat dispatch for stable diff comparisons.
[ Identity, Bidi, Casing, Binary, Names, CJK, Display, Segmentation, Indic, Emoji, ].freeze
Class Method Summary collapse
-
.apply(cp, indices) ⇒ Object
Apply every enrichment concern to
cp, in registry order.
Class Method Details
.apply(cp, indices) ⇒ Object
Apply every enrichment concern to cp, in registry order.
46 47 48 |
# File 'lib/ucode/coordinator/enrichment.rb', line 46 def self.apply(cp, indices) REGISTRY.each { |mod| mod.enrich(cp, indices) } end |