39 lines
515 B
Ruby
39 lines
515 B
Ruby
puts <<GROCERY_LIST
|
|
Grocery list
|
|
------------
|
|
1. Salad mix.
|
|
2. Strawberries.*
|
|
3. Cereal.
|
|
4. Milk.*
|
|
|
|
* Organic
|
|
|
|
GROCERY_LIST
|
|
|
|
puts '
|
|
Categorized Grocery list
|
|
------------------------
|
|
'
|
|
|
|
puts 'Produce', '-------', <<PRODUCE, 'Dairy', '-----', <<DAIRY, '* Organic'
|
|
1. Strawberries*
|
|
2. Blueberries
|
|
|
|
PRODUCE
|
|
1. Yogurt
|
|
2. Milk*
|
|
3. Cottage Cheese
|
|
|
|
|
|
DAIRY
|
|
|
|
|
|
puts
|
|
puts 'Indented Grocery list',
|
|
'---------------------', <<-GROCERY_LIST
|
|
1. Salad mix.
|
|
2. Strawberries.
|
|
3. Cereal.
|
|
4. Milk.
|
|
GROCERY_LIST
|