Guest User

Untitled

a guest
Feb 21st, 2018
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. class Integer; def bottles;"#{self} bottle#{self==1?'':'s'} of beer" end
  2. def share;"you take one down,\npass it around\n#{(self-1).bottles.wall}" end end
  3. class String;def wall;"#{self} on the wall";end end
  4. 99.downto 1 do |b| puts b.bottles.wall, b.bottles, b.share+"." end
Add Comment
Please, Sign In to add comment