Created
September 24, 2015 17:18
-
-
Save igb/b5ae0a1bd9dcb1d7ef5f to your computer and use it in GitHub Desktop.
Five Little Monkeys Jumping on the Bed
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
m="monkey" | |
l="little " | |
f="Five #{l}#{m}s" | |
s="So "<<f.downcase | |
t=[] | |
t<<"It was bedtime." | |
t<<"#{s} took a bath." | |
t<<"#{f} put on their pajamas." | |
t<<"#{f} brushed their teeth." | |
t<<"#{f} said goodnight to their mama." | |
for i in ["five", "four", "three","two", "one"] | |
t<<"#{ (i == "five") ? "Then..." : "So"} #{i} #{l}#{m}#{ (i == "one") ? "" : "s"} jumped on the bed!" | |
t<<"One fell off and bumped #{ i == "three" || i == "one" ? "her" : "his"} head." | |
t<<"The mama called the doctor. The doctor said, \"No more #{m}s jumping on the bed!\"" | |
end | |
t<<"#{s} fell fast asleep." | |
t<<"\"Thank goodness!\" said the mama." | |
t<<"\"Now I can go to bed!\"" | |
for x in t | |
puts x | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment