module TanukiEmoji
Tanuki Emoji
Constants
- VERSION
Public Class Methods
add(name, codepoints:, alpha_code:, description:)
click to toggle source
Add a new Emoji to the index
@param [String] name @param [String] codepoints @param [String] alpha_code
# File lib/tanuki_emoji.rb, line 41 def self.add(name, codepoints:, alpha_code:, description:) emoji = Character.new(name, codepoints: codepoints, alpha_code: alpha_code, description: description) index.add(emoji) end
find_by_alpha_code(alpha_code)
click to toggle source
Find an Emoji by its :alpha_code:
@param [String] alpha_code @return [TanukiEmoji::Character]
# File lib/tanuki_emoji.rb, line 17 def self.find_by_alpha_code(alpha_code) index.find_by_alpha_code(alpha_code) end
find_by_codepoints(unicode_codepoints)
click to toggle source
Find an Emoji by its Unicode representation
@param [String] unicode_codepoints @return [TanukiEmoji::Character]
# File lib/tanuki_emoji.rb, line 25 def self.find_by_codepoints(unicode_codepoints) index.find_by_codepoints(unicode_codepoints) end
images_path()
click to toggle source
# File lib/tanuki_emoji.rb, line 47 def self.images_path File.expand_path(File.join(__dir__, "../app/assets/images/tanuki_emoji")) end
index()
click to toggle source
Index
contains all known emojis
@return [Array<TanukiEmoji::Character>]
# File lib/tanuki_emoji.rb, line 32 def self.index TanukiEmoji::Index.instance end