Commit 4a6c2261 by Andrew Cantino

remove unused methods

parent 0e7b372e
......@@ -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
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment