Skip to content

Instantly share code, notes, and snippets.

@isaacsanders
Last active April 11, 2017 19:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save isaacsanders/bf1ba2f346c5aee025b2 to your computer and use it in GitHub Desktop.
Save isaacsanders/bf1ba2f346c5aee025b2 to your computer and use it in GitHub Desktop.
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