summaryrefslogtreecommitdiff
path: root/lib/award_emoji.rb
blob: 4d99164bc3319e8fc1dc241627d8735da93d1115 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
class AwardEmoji
  EMOJI_LIST = [
    "+1", "-1", "100", "blush", "heart", "smile", "rage",
    "beers", "disappointed", "ok_hand",
    "helicopter", "shit", "airplane", "alarm_clock",
    "ambulance", "anguished", "two_hearts", "wink"
  ]

  ALIASES = {
    pout: "rage",
    satisfied: "laughing",
    hankey: "shit",
    poop: "shit",
    collision: "boom",
    thumbsup: "+1",
    thumbsdown: "-1",
    punch: "facepunch",
    raised_hand: "hand",
    running: "runner",
    ng_woman: "no_good",
    shoe: "mans_shoe",
    tshirt: "shirt",
    honeybee: "bee",
    flipper: "dolphin",
    paw_prints: "feet",
    waxing_gibbous_moon: "moon",
    telephone: "phone",
    knife: "hocho",
    envelope: "email",
    pencil: "memo",
    open_book: "book",
    sailboat: "boat",
    red_car: "car",
    lantern: "izakaya_lantern",
    uk: "gb",
    heavy_exclamation_mark: "exclamation",
    squirrel: "shipit"
  }.with_indifferent_access

  def self.path_to_emoji_image(name)
    "emoji/#{Emoji.emoji_filename(name)}.png"
  end

  def self.normilize_emoji_name(name)
    ALIASES[name] || name
  end
end