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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 618fbd8c97d5934b629d8e754a4a1f6e404d9fef
4
- data.tar.gz: e3b264e3897c2af8fb97accd0de0d62fda86b59c
3
+ metadata.gz: e5852a9c3363550f38b718ae54ed39d7ba6057bd
4
+ data.tar.gz: ae060d3d15d5afa05c8d9b4c89884d4e534fc39e
5
5
  SHA512:
6
- metadata.gz: 9c60da14c781e5feba4e30f36865d74986626f2587bbac11a31dfcc53d99c965d9319fea88758a335ac7b23ceb17367f41a20694ff1c886641a7a53473bd292e
7
- data.tar.gz: 327ab13c73fae175e2cc9d00ae41a48798a73a482af3437f1ee6c4fd7d66f676529b38e5d9a2c206487e98e9b38c732c8d61c61e2ae3637fa0091df937590045
6
+ metadata.gz: d55e5136dcc91c79f48d3bff1b693215b1f95338be06f3e19611f48d5d3e2959fed584de657c10272dd0337df7d03b174b7b575defd3081d02af1acc432d00c6
7
+ data.tar.gz: ba98650377f116b9706cc86b5ff12d22bdaeb022e7c4e486d09af5ed4b78e6fdb4ccef82efe043ab554281b8e2d44eec0ce7bc0cb14da3a3481eb019986c646f
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## v0.4.4
2
+
3
+ - Support `Somemoji::EmojiCollection#search_by_code`
4
+
1
5
  ## v0.4.3
2
6
 
3
7
  - Support `Somemoji::Emoji#to_hash`
@@ -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}]
@@ -1,3 +1,3 @@
1
1
  module Somemoji
2
- VERSION = "0.4.3"
2
+ VERSION = "0.4.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: somemoji
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryo Nakamura