Module: EMOJI

Defined in:
lib/meiou/emoji.rb

Class Method Summary collapse

Class Method Details

.[](k) ⇒ Object



5
6
7
# File 'lib/meiou/emoji.rb', line 5

def self.[] k
  Emoji.find_by_alias(k.to_s)
end

.translate(i) ⇒ Object



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

def self.translate i
  a = []
  Meiou.extract(i) { |e| if EMOJI[e[:word]]; a << EMOJI[e[:word]].raw; else; a << e[:word]; end }
  return a
end