The I in Team (in Ruby)
# Inspired by http://www.neatorama.com/2012/06/13/there-is-an-i-in-team/
class String
alias_method :original_count, :count
def count(other)
if self == 'team' && other.downcase == 'i'
1
else
original_count(other)
end
end
end
Written by Daniel Morrison
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#N
Authors
Related Tags
#n
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#