somemoji 0.4.3 → 0.4.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/somemoji/emoji_collection.rb +14 -0
- data/lib/somemoji/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e5852a9c3363550f38b718ae54ed39d7ba6057bd
|
4
|
+
data.tar.gz: ae060d3d15d5afa05c8d9b4c89884d4e534fc39e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d55e5136dcc91c79f48d3bff1b693215b1f95338be06f3e19611f48d5d3e2959fed584de657c10272dd0337df7d03b174b7b575defd3081d02af1acc432d00c6
|
7
|
+
data.tar.gz: ba98650377f116b9706cc86b5ff12d22bdaeb022e7c4e486d09af5ed4b78e6fdb4ccef82efe043ab554281b8e2d44eec0ce7bc0cb14da3a3481eb019986c646f
|
data/CHANGELOG.md
CHANGED
@@ -126,6 +126,20 @@ module Somemoji
|
|
126
126
|
end
|
127
127
|
end
|
128
128
|
|
129
|
+
# Searches emojis that match with given pattern
|
130
|
+
# @param pattern [Object]
|
131
|
+
# @return [Somemoji::EmojiCollection]
|
132
|
+
# @example
|
133
|
+
# Somemoji.emoji_collection.search_by_code(/^cus/).map(&:code)
|
134
|
+
# #=> ["custard", "customs"]
|
135
|
+
def search_by_code(pattern)
|
136
|
+
self.class.new(
|
137
|
+
select do |emoji|
|
138
|
+
pattern === emoji.code
|
139
|
+
end
|
140
|
+
)
|
141
|
+
end
|
142
|
+
|
129
143
|
private
|
130
144
|
|
131
145
|
# @return [Hash{String => Somemoji::Emoji}]
|
data/lib/somemoji/version.rb
CHANGED