Sha256: ac39162427355e047a55d753040970d5fb73c70c3672164222347c5cd3605cbd
Contents?: true
Size: 492 Bytes
Versions: 1
Compression:
Stored size: 492 Bytes
Contents
require 'yaml' module Prawn module Emoji class Image STORE = Emoji.root.join 'emoji', 'images' attr_reader :unicode def initialize(unicode) @unicode = unicode end def path STORE.join("#{codepoint}.png").to_s end def ==(other) unicode == other.unicode end private def codepoint @codepoint ||= @unicode.codepoints.map { |c| '%04x' % c.to_s }.join('-').downcase end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
prawn-emoji-2.0.0 | lib/prawn/emoji/image.rb |