lib/named_emoji.rb in named_emoji-1.0.3 vs lib/named_emoji.rb in named_emoji-1.1.0
- old
+ new
@@ -1,10 +1,10 @@
require "named_emoji/version"
module NamedEmoji
PEOPLE = {
- :'bowtie' => nil,
+ # :'bowtie' => nil,
:'smile' => "\u{1F604}",
:'blush' => "\u{1F60A}",
:'smiley' => "\u{1F603}",
:'relaxed' => "\u{263A}",
:'smirk' => "\u{1F60F}",
@@ -45,15 +45,15 @@
:'broken_heart' => "\u{1F494}",
:'heartbeat' => "\u{1F493}",
:'heartpulse' => "\u{1F497}",
:'cupid' => "\u{1F498}",
:'sparkles' => "\u{2728}",
- :'star' => nil,
+ # :'star' => nil,
:'star2' => "\u{1F31F}",
:'anger' => "\u{1F4A2}",
- :'exclamation' => nil,
- :'question' => nil,
+ # :'exclamation' => nil,
+ # :'question' => nil,
:'grey_exclamation' => "\u{2755}",
:'grey_question' => "\u{2754}",
:'zzz' => "\u{1F4A4}",
:'dash' => "\u{1F4A8}",
:'sweat_drops' => "\u{1F4A6}",
@@ -81,11 +81,11 @@
:'raised_hands' => "\u{1F64C}",
:'pray' => "\u{1F64F}",
:'point_up_2' => "\u{1F446}",
:'clap' => "\u{1F44F}",
:'muscle' => "\u{1F4AA}",
- :'metal' => nil,
+ # :'metal' => nil,
:'walking' => "\u{1F6B6}",
:'runner' => "\u{1F3C3}",
:'couple' => "\u{1F46B}",
:'dancer' => "\u{1F483}",
:'dancers' => "\u{1F46F}",
@@ -118,21 +118,21 @@
:'lips' => "\u{1F444}",
:'kiss' => "\u{1F48B}",
:'ear' => "\u{1F442}",
:'eyes' => "\u{1F440}",
:'nose' => "\u{1F443}",
- :'feelsgood' => nil,
- :'finnadie' => nil,
- :'goberserk' => nil,
- :'godmode' => nil,
- :'hurtrealbad' => nil,
- :'rage1' => nil,
- :'rage2' => nil,
- :'rage3' => nil,
- :'rage4' => nil,
- :'suspect' => nil,
- :'trollface' => nil,
+ # :'feelsgood' => nil,
+ # :'finnadie' => nil,
+ # :'goberserk' => nil,
+ # :'godmode' => nil,
+ # :'hurtrealbad' => nil,
+ # :'rage1' => nil,
+ # :'rage2' => nil,
+ # :'rage3' => nil,
+ # :'rage4' => nil,
+ # :'suspect' => nil,
+ # :'trollface' => nil,
}
NATURE = {
:'sunny' => "\u{2600}",
:'umbrella' => "\u{2614}",
@@ -331,11 +331,11 @@
:'coffee' => "\u{2615}",
:'tea' => "\u{1F375}",
}
PLACES = {
- :'109' => nil,
+ # :'109' => nil,
:'house' => "\u{1F3E0}",
:'school' => "\u{1F3EB}",
:'office' => "\u{1F3E2}",
:'post_office' => "\u{1F3E3}",
:'hospital' => "\u{1F3E5}",
@@ -507,20 +507,19 @@
:'o' => "\u{2B55}",
:'x' => "\u{274C}",
:'copyright' => "\u{00A9}",
:'registered' => "\u{00AE}",
:'tm' => "\u{2122}",
- :'shipit' => nil,
+ # :'shipit' => nil,
}
- ALL = PEOPLE.merge(NATURE).merge(OBJECTS).merge(PLACES).merge(SYMBOLS)
-
def self.[](name)
- ALL[name.to_sym]
+ warn '`.[]` is deprecated. Please use `.emojis[]` instead'
+ emojis[name.to_sym]
end
- def self.each(&block)
- ALL.each(&block)
+ def emojis
+ @all ||= PEOPLE.merge(NATURE).merge(OBJECTS).merge(PLACES).merge(SYMBOLS)
end
- extend Enumerable
+ extend self
end