Sha256: adab9ba9ed0aa4d93bf65fecee57cc4f4d36bb9e12e912b8fa8f933e0f24895c

Contents?: true

Size: 748 Bytes

Versions: 5

Compression:

Stored size: 748 Bytes

Contents

# encoding: UTF-8

# Copyright 2012 Twitter, Inc
# http://www.apache.org/licenses/LICENSE-2.0

module TwitterCldr
  module Resources
    module Properties

      class EmojiImporter < PropertyImporter
        DATA_FILE = 'emoji-data.txt'

        requirement :emoji, Versions.emoji_version, [DATA_FILE]
        output_path 'unicode_data/properties'
        ruby_engine :mri

        private

        def source_path
          requirements[:emoji].source_path_for(DATA_FILE)
        end

        def load
          super do |data, ret|
            code_points = expand_range(data[0])
            property_name = format_property_value(data[1])
            ret[property_name][nil] += code_points
          end
        end
      end

    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
twitter_cldr-5.4.0 lib/twitter_cldr/resources/properties/emoji_importer.rb
twitter_cldr-5.3.0 lib/twitter_cldr/resources/properties/emoji_importer.rb
twitter_cldr-5.2.0 lib/twitter_cldr/resources/properties/emoji_importer.rb
twitter_cldr-5.1.0 lib/twitter_cldr/resources/properties/emoji_importer.rb
twitter_cldr-5.0.0 lib/twitter_cldr/resources/properties/emoji_importer.rb