Sha256: 73b2e80232dfb11faceb3cd26ba05f0c2421c71d8facbc4df4e5b782ee9bd6eb

Contents?: true

Size: 766 Bytes

Versions: 4

Compression:

Stored size: 766 Bytes

Contents

# frozen_string_literal: true

require 'prawn'
require 'unicode/emoji'
require 'pathname'

module Prawn
  module Emoji
    Config = Struct.new(
      # Emoji Regex
      #
      # The following values are available (Default is `Unicode::Emoji::REGEX_VALID`):
      # https://github.com/janlelis/unicode-emoji#regex.
      :regex
    )
    def self.config
      @config ||= Config.new(::Unicode::Emoji::REGEX_VALID)
    end

    def self.regex
      config.regex
    end

    def self.root
      @root ||= Pathname.new File.expand_path('../..', File.dirname(__FILE__))
    end

    def self.extended(object)
      object.extend Drawable
    end
  end
end

require_relative 'emoji/version'
require_relative 'emoji/drawable'

Prawn::Document.extensions << Prawn::Emoji

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
prawn-emoji-4.0.0 lib/prawn/emoji.rb
prawn-emoji-4.0.0.beta.1 lib/prawn/emoji.rb
prawn-emoji-3.3.0 lib/prawn/emoji.rb
prawn-emoji-3.2.0 lib/prawn/emoji.rb