Class: String

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

Instance Method Summary collapse

Instance Method Details

#emoji_dataObject



10
11
12
13
# File 'lib/emoji/string_ext.rb', line 10

def emoji_data
  index = Emoji.index
  index.find_by_moji(self) || index.find_by_name(self)
end

#image_urlObject



6
7
8
# File 'lib/emoji/string_ext.rb', line 6

def image_url
  Emoji.image_url_for_name(self.emoji_data['name'])
end

#with_emoji_imagesObject



2
3
4
# File 'lib/emoji/string_ext.rb', line 2

def with_emoji_images
  Emoji.replace_unicode_moji_with_images(self)
end