Open this lab in the text editor. Code your solution in the meal_choice.rb
file.
Your job is to define three methods, breakfast
, lunch
and dinner
that take in a food as a string and returns a string stating the appropriate time to eat that food. For example, calling breakfast("scrambled eggs")
should return something like "Morning is the best time for scrambled eggs!"
Include a default meal_choice for each method so that if no food is specified, it defaults to your favorite food. For example, calling breakfast
with no argument should return "Morning is the best time for Frosted Flakes!"
Take a look at the example code to get started.
Call all of your methods (with and without arguments) at the bottom of the file. Then run your program.