getting silly with "here documents"
This commit is contained in:
parent
a333293919
commit
4fdc97001d
23
wikibooks-tutorial/grocery-list.rb
Normal file
23
wikibooks-tutorial/grocery-list.rb
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
puts <<GROCERY_LIST
|
||||||
|
Grocery list
|
||||||
|
------------
|
||||||
|
1. Salad mix.
|
||||||
|
2. Strawberries.*
|
||||||
|
3. Cereal.
|
||||||
|
4. Milk.*
|
||||||
|
|
||||||
|
* Organic
|
||||||
|
|
||||||
|
GROCERY_LIST
|
||||||
|
|
||||||
|
|
||||||
|
puts 'Produce', '-------', <<PRODUCE, 'Dairy', '-----', <<DAIRY, '* Organic'
|
||||||
|
1. Strawberries*
|
||||||
|
2. Blueberries
|
||||||
|
|
||||||
|
PRODUCE
|
||||||
|
1. Yogurt
|
||||||
|
2. Milk*
|
||||||
|
3. Cottage Cheese
|
||||||
|
|
||||||
|
DAIRY
|
Loading…
Reference in New Issue
Block a user