Class: Prawn::Emoji::Image

Inherits:
Object
  • Object
show all
Defined in:
lib/prawn/emoji/image.rb

Constant Summary collapse

STORE =
Emoji.root.join 'emoji', 'images'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(unicode) ⇒ Image



10
11
12
# File 'lib/prawn/emoji/image.rb', line 10

def initialize(unicode)
  @unicode = unicode
end

Instance Attribute Details

#unicodeObject (readonly)

Returns the value of attribute unicode.



8
9
10
# File 'lib/prawn/emoji/image.rb', line 8

def unicode
  @unicode
end

Instance Method Details

#==(other) ⇒ Object



18
19
20
# File 'lib/prawn/emoji/image.rb', line 18

def ==(other)
  unicode == other.unicode
end

#pathObject



14
15
16
# File 'lib/prawn/emoji/image.rb', line 14

def path
  STORE.join("#{codepoint}.png").to_s
end