Skip to content

Instantly share code, notes, and snippets.

@fourseven
Last active Aug 29, 2015
Embed
What would you like to do?
def b i=1,w=nil
"#{i} bottle#{:s if i>1} of beer#{" on the wall" if w}"
end
puts *99.downto(2).map {|n| "#{b n,1}, #{b n}.\nTake one down and pass it around, #{b n-1,1}.\n\n"}
puts "#{b 1,1}, #{b}.\nGo to the store and buy some more, #{b 99,1}.\n\n"
@Breccan
Copy link

Breccan commented Mar 29, 2014

"#{i} bottle#{:s if i>1} of beer#{" on the wall" if w}"

@fourseven
Copy link
Author

fourseven commented Mar 29, 2014

Thanks @Breccan, updated! :shipit:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment