Last active
April 11, 2017 19:14
-
-
Save isaacsanders/bf1ba2f346c5aee025b2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def function(a) | |
a.group_by.inject({}) do |hash, (key,val)| | |
hash[key] = val.count if val.count > 1 | |
hash | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment