Last active
December 26, 2015 16:09
-
-
Save peashutop/7177597 to your computer and use it in GitHub Desktop.
without inject, too much ceremony
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 total_pony_count | |
total_ponies = 0 | |
farms.each do |farm| | |
total_ponies += farm.pony_count | |
end | |
total_ponies | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment