Skip to content

Instantly share code, notes, and snippets.

@melborne
Last active August 29, 2015 14:01
Show Gist options
  • Save melborne/902796b58256b077add0 to your computer and use it in GitHub Desktop.
Save melborne/902796b58256b077add0 to your computer and use it in GitHub Desktop.
require "named_emoji"
class Symbol
def ~
to_s
.split
.map { |w| NamedEmoji.emojis[w.intern.downcase] || w }
.join(" ")
end
end
puts ~:smile
puts ~:beginner
puts ~:shit
puts ~:jack_o_lantern
puts ~:'+1'
puts ~:"I broken_heart you!"
puts ~:"The Pencil is mightier than gun"
puts ~:"Dango is better than sunflower"
puts ~:"疲れたら beer を飲もう!"
puts ~:"Fish + Scissors => Sushi"
# >> 😄
# >> 🔰
# >> 💩
# >> 🎃
# >> 👍
# >> I 💔 you!
# >> The 📝 is mightier than 🔫
# >> 🍡 is better than 🌻
# >> 疲れたら 🍺 を飲もう!
# >> 🐟 + ✂ => 🍣
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment