Class: Prawn::Emoji::Text
- Inherits:
-
Object
- Object
- Prawn::Emoji::Text
- Defined in:
- lib/prawn/emoji/text.rb
Instance Attribute Summary collapse
-
#emoji_char ⇒ Object
readonly
Returns the value of attribute emoji_char.
-
#left ⇒ Object
readonly
Returns the value of attribute left.
-
#remaining ⇒ Object
readonly
Returns the value of attribute remaining.
Instance Method Summary collapse
- #contains_emoji? ⇒ Boolean
-
#initialize(text, font_size) ⇒ Text
constructor
A new instance of Text.
- #left_with_emoji ⇒ Object
- #to_s ⇒ Object
Constructor Details
Instance Attribute Details
#emoji_char ⇒ Object (readonly)
Returns the value of attribute emoji_char.
8 9 10 |
# File 'lib/prawn/emoji/text.rb', line 8 def emoji_char @emoji_char end |
#left ⇒ Object (readonly)
Returns the value of attribute left.
8 9 10 |
# File 'lib/prawn/emoji/text.rb', line 8 def left @left end |
#remaining ⇒ Object (readonly)
Returns the value of attribute remaining.
8 9 10 |
# File 'lib/prawn/emoji/text.rb', line 8 def remaining @remaining end |
Instance Method Details
#contains_emoji? ⇒ Boolean
16 17 18 |
# File 'lib/prawn/emoji/text.rb', line 16 def contains_emoji? !emoji_char.nil? end |
#left_with_emoji ⇒ Object
20 21 22 |
# File 'lib/prawn/emoji/text.rb', line 20 def left_with_emoji left + emoji_char.to_s end |
#to_s ⇒ Object
24 25 26 |
# File 'lib/prawn/emoji/text.rb', line 24 def to_s @text end |