lib/prawn/emoji/text.rb in prawn-emoji-4.0.0.beta.1 vs lib/prawn/emoji/text.rb in prawn-emoji-4.0.0
- old
+ new
@@ -3,23 +3,23 @@
require_relative 'char'
module Prawn
module Emoji
class Text
- attr_reader :left, :emoji, :remaining
+ attr_reader :left, :emoji_char, :remaining
def initialize(text, font_size)
@text = text
- @left, emoji_char, @remaining = partition_by_emoji(text)
- @emoji = Emoji::Char.new(emoji_char, font_size) unless emoji_char.empty?
+ @left, emoji, @remaining = partition_by_emoji(text)
+ @emoji_char = Emoji::Char.new(emoji, font_size) unless emoji.empty?
end
def contains_emoji?
- !emoji.nil?
+ !emoji_char.nil?
end
def left_with_emoji
- left + emoji.to_s
+ left + emoji_char.to_s
end
def to_s
@text
end