-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtestcode.rb
More file actions
35 lines (26 loc) · 927 Bytes
/
Copy pathtestcode.rb
File metadata and controls
35 lines (26 loc) · 927 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
require_relative 'cookbook'
mex_cuisine = Cookbook.new("Mexican Cooking")
burrito = Recipe.new("Bean Burrito", ["tortilla", "bean"], ["heat beans", "place beans in tortilla", "roll up"])
puts mex_cuisine.title
puts burrito.title
p burrito.ingredients
p burrito.steps
mex_cuisine.title = "Mexican Recipes"
puts mex_cuisine.title
burrito.title = "Veggie Burrito"
burrito.ingredients = ["tortilla", "tomatoes"]
burrito.steps = ["heat tomatoes", "place tomatoes in tortilla", "roll up"]
p burrito.title
p burrito.ingredients
mex_cuisine.recipes
mex_cuisine.add_recipe(burrito)
p mex_cuisine.recipes
mex_cuisine.recipe_titles
mex_cuisine.recipe_ingredients
burrito.print_recipe
taco = Recipe.new("Paco's Taco", ["taco shell", "pulled pork", "onion"], ["assemble", "top with lime and cilantro"])
mex_cuisine.add_recipe(taco)
p mex_cuisine.recipes
mex_cuisine.recipe_titles
# print cookbook
mex_cuisine.print_cookbook