Skip to content

Instantly share code, notes, and snippets.

View brianbrazil's full-sized avatar

Brian Brazil brianbrazil

  • Unite Us
  • Providence, RI
View GitHub Profile
Enumerable.class_eval do
def count_by
group_by { |a| yield a }.map { |a,b| { a => b.count } }
end
end

Keybase proof

I hereby claim:

  • I am brianbrazil on github.
  • I am brianbrazil (https://keybase.io/brianbrazil) on keybase.
  • I have a public key whose fingerprint is 9E48 B54C ED40 64B7 7A3D EA58 CC30 5BD9 DCF9 AA8E

To claim this, I am signing this object: