# My Little Ruby Valentine (#192)

**URL:** <https://www.ruby-forum.com/t/my-little-ruby-valentine-192/160276>\
**Category:** Ruby\
**Created:** [February 13, 2009, 4:49pm UTC](https://www.ruby-forum.com/t/my-little-ruby-valentine-192/160276 "2009-02-13T16:49:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![danmcb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/13edae/32.png) [@danmcb](https://www.ruby-forum.com/u/danmcb)\
**Post date:** [February 13, 2009, 4:49pm UTC](https://www.ruby-forum.com/t/my-little-ruby-valentine-192/160276/1 "2009-02-13T16:49:10Z")

</div>

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

The three rules of Ruby Q.:

1. Please do not post any solutions or spoiler discussion for this  
quiz until 48 hours have elapsed from the time this message was  
sent.

2. Support Ruby Q. by submitting ideas and responses  
as often as you can! Visit: [http://rubyquiz.strd6.com](http://rubyquiz.strd6.com)

3. Enjoy!

Suggestion: A [QUIZ] in the subject of emails about the problem  
helps everyone on Ruby T. follow the discussion. Please reply to  
the original quiz message, if you can.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

## My Little Ruby Valentine (#192)

Write a program that presents a Valentine’s day card. You may wish to  
present text with a design, image or some colorful ASCII. There are no  
formal requirements, you may choose to make it as simple, complex, or  
creative as you like.

---

<div class="post-metadata">

**Author:** ![danmcb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/13edae/32.png) [@danmcb](https://www.ruby-forum.com/u/danmcb)\
**Post date:** [February 22, 2009, 3:16am UTC](https://www.ruby-forum.com/t/my-little-ruby-valentine-192/160276/2 "2009-02-22T03:16:21Z")

</div>

There was no response to this week’s quiz on the mailing list, but  
like a ray of hope peeking out through dark clouds there was _one_  
solution:

ruby -e ‘puts [[3,3],9,9,7,5,3,1].map{|t|[_t].map{|n|"_“\*n}.join(”  
").center(9)}’

(posted via Twitter: [http://twitter.com/mrcryn/status/1217357005](http://twitter.com/mrcryn/status/1217357005))

I will summarize my feelings with a modified version of Ryan’s solution:

puts  
[[3,0,0,0,3],[4,0,0,5],[5,0,0,4],[4,0,0,3],[3,0,0,2],[1,0,0,2],[0,1]].map{|t|[_t].map{|n|"_“\*n}.join(”  
").center(13)}
