Sha256: 559e76c9d9c00422442b6ceedd5509e26e05e30fcf45ba3e3f26282d6c14fb2a

Contents?: true

Size: 709 Bytes

Versions: 2

Compression:

Stored size: 709 Bytes

Contents

require "emoji/data/version"
require "emoji/data/data_base"
require "emoji/data/emoji_data"
require "emoji/data/sequence_base"
require "emoji/data/zwj_sequence"
require "emoji/data/sequence"

module Emoji
  module Data
    def self.emoji_data_json
      require "json"
      EmojiData.new.all.map(&:to_h).to_json
    end

    def self.emoji_sequences_json
      require "json"
      Sequence.new.all.map(&:to_h).to_json
    end

    def self.emoji_zwj_sequences_json
      require "json"
      ZwjSequence.new.all.map(&:to_h).to_json
    end

    def self.emoji_utr_51_json
      require "json"
      [EmojiData.new.all, Sequence.new.all, ZwjSequence.new.all].flatten(1).map(&:to_h).to_json
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
emoji-data-1.0.0 lib/emoji/data.rb
emoji-data-0.1.0 lib/emoji/data.rb