Module: Ucode::Coordinator::Enrichment::Emoji

Defined in:
lib/ucode/coordinator/enrichment/emoji.rb

Overview

Emoji property bundle. Each Emoji_* property from emoji-data.txt flips the matching boolean on the Emoji sub-model.

Class Method Summary collapse

Class Method Details

.enrich(cp, indices) ⇒ Object



10
11
12
13
14
15
16
17
18
# File 'lib/ucode/coordinator/enrichment/emoji.rb', line 10

def enrich(cp, indices)
  return unless RangeLookup.find_in_range(cp.cp, indices.emoji_properties)

  props = RangeLookup.all_range_values(cp.cp, indices.emoji_properties)
  return if props.empty?

  cp.emoji ||= Ucode::Models::CodePoint::Emoji.new
  props.each { |prop| apply_property(cp, prop) }
end