Quantcast
Channel: Active questions tagged ruby - Stack Overflow
Viewing all articles
Browse latest Browse all 4610

How can I write a happy birthday message in Ruby to put on a cake?

$
0
0

Original Question

My boyfriend is celebrating his birthday shortly and I am ordering a custom cake for him. I want to write Happy Birthday on it in a clever Ruby coding way. It will be on a black background to make it the most realistic, and can choose various colors for the font. Here is what I have so far. Anything I should change to make it better/more accurate/nerdier?

So far I have the following:

#!/usr/sja/ruby*@my_best_friend = “Larry”puts “Happy 30th Birthday #{@my_best_friend}!”

Update

Based on some answers and comments, I've changed the code to:

EVENT = "30th birthday"MY_BEST_FRIEND = "Larry"YOUR_BEST_FRIEND = "Sarah"puts "Happy #{EVENT}, #{MY_BEST_FRIEND}!", "Love, #{YOUR_BEST_FRIEND}"

Is there anything else I should do to make this work correctly or improve it?


Viewing all articles
Browse latest Browse all 4610

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>