The I in Team (em 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
Tagged