Sha256: 0ebf02f442ec5456b2e483e247057d1372ea0f8f5085ec04b386b341818d113e
Contents?: true
Size: 580 Bytes
Versions: 7
Compression:
Stored size: 580 Bytes
Contents
# frozen_string_literal: true require_relative 'drawer' module Prawn module Emoji module Drawable # == Additional Options # <tt>:emoji</tt>:: <tt>boolean</tt>. Whether or not to draw an emoji [true] def draw_text!(text, options) draw_emoji = options.delete(:emoji) { true } if draw_emoji && Emoji::Drawer.drawable?(text) emoji_drawer.draw(text.to_s, options) else super end end private def emoji_drawer @emoji_drawer ||= Emoji::Drawer.new(self) end end end end
Version data entries
7 entries across 7 versions & 1 rubygems