Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
rumoji
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ikcrm_common
rumoji
Commits
4a6c2261
Commit
4a6c2261
authored
Aug 21, 2015
by
Andrew Cantino
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove unused methods
parent
0e7b372e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
23 deletions
+0
-23
lib/rumoji/emoji.rb
+0
-16
spec/rumoji/emoji_spec.rb
+0
-7
No files found.
lib/rumoji/emoji.rb
View file @
4a6c2261
...
...
@@ -64,21 +64,5 @@ module Rumoji
def
self
.
find_by_string
(
string
)
STRING_LOOKUP
[
string
]
end
CODEPOINT_LOOKUP
=
ALL
.
each
.
with_object
({})
do
|
emoji
,
lookup
|
emoji
.
codepoints
.
each
do
|
codepoint
|
lookup
[
codepoint
]
||=
[]
lookup
[
codepoint
]
<<
emoji
unless
lookup
[
codepoint
].
include?
(
emoji
)
end
end
def
self
.
select_by_codepoint
(
codepoint
)
CODEPOINT_LOOKUP
[
codepoint
]
||
[]
end
def
self
.
find_by_codepoint
(
codepoint
)
ALL
.
find
{
|
emoji
|
emoji
.
hex
==
codepoint
.
to_s
(
16
).
upcase
}
end
end
end
spec/rumoji/emoji_spec.rb
View file @
4a6c2261
...
...
@@ -69,12 +69,5 @@ describe Rumoji::Emoji do
it
"finds an emoji from a string"
do
subject
.
find_by_string
(
smile_str
).
symbol
.
must_equal
smile_sym
end
it
"finds an emoji from a codepoint"
do
smile_str
.
codepoints
.
map
do
|
point
|
subject
.
find_by_codepoint
(
point
).
symbol
.
must_equal
smile_sym
end
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment