Sha256: 8a032a79c4b940f6f03075fc27ede91e1cd33c7b46ed27e12bef0e71f4629d30

Contents?: true

Size: 800 Bytes

Versions: 6

Compression:

Stored size: 800 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,

      keyword_init: true
    )
    def self.config
      @config ||= Config.new(regex: ::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

6 entries across 6 versions & 1 rubygems

Version Path
prawn-emoji-5.3.0 lib/prawn/emoji.rb
prawn-emoji-5.2.0 lib/prawn/emoji.rb
prawn-emoji-5.1.0 lib/prawn/emoji.rb
prawn-emoji-5.0.0 lib/prawn/emoji.rb
prawn-emoji-4.2.0 lib/prawn/emoji.rb
prawn-emoji-4.1.0 lib/prawn/emoji.rb