Created
May 20, 2012 16:57
-
-
Save moski/2758758 to your computer and use it in GitHub Desktop.
draw a heart in ruby
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
# Draw a heart in ruby | |
# blog post http://blog.moski.me/2012/05/drawing-hearts-in-ruby.html | |
# | |
puts [[2,2],9,9,7,5,3,1].map{|t|[*t].map{|n|"*"*n}.join(" ").center(9)} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment