Class: Emoji::Extractor::GlyphIndex

Inherits:
Struct
  • Object
show all
Defined in:
lib/emoji/extractor.rb

Instance Method Summary collapse

Instance Method Details

#each(&block) ⇒ Object



117
118
119
# File 'lib/emoji/extractor.rb', line 117

def each(&block)
  length.times(&block)
end

#each_with_nameObject



121
122
123
124
125
# File 'lib/emoji/extractor.rb', line 121

def each_with_name
  each do |glyph_id|
    yield glyph_id, name_for(glyph_id)
  end
end

#name_for(glyph_id) ⇒ Object



112
113
114
115
# File 'lib/emoji/extractor.rb', line 112

def name_for(glyph_id)
  index = name_index[glyph_id]
  names[index - 257]
end