pizza-generator 0.0.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/pizza-generator.rb +56 -3
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1f99a0c3c4cebc2012c2d4832647ffda154e4b29
4
- data.tar.gz: 9ff5f54b649ae0fc030cdb8273dc0ed64b7d3308
3
+ metadata.gz: 374e797071f016dceaf5379ab74226d4bebd3dfa
4
+ data.tar.gz: b5b7cf6d4898d318d41579e53aadcc0dca0cc09f
5
5
  SHA512:
6
- metadata.gz: 23423f26966184a288a39cc1e6957d9a57bba44f365dacb33f06252114279db3668830d014d2d89856d8c39c6613a9ac0f920f0dc94316d83bb1dab64463b141
7
- data.tar.gz: 2be451e08e27cfb16ad04dd98913e345dd9856ca2707aff20181fb6ac7f6d319effb54f1e452fb7f737a1d730b81f57327973282045e8e9181ec6987fd6a1ac7
6
+ metadata.gz: 27c545aff0862bd63a587ed070ecb535a9eaf2c257e9811d8f408535702b202a9f5e62e625e33a514d4e22ea90f7cb89f3cab1a84dea504845da3ba3f37a0785
7
+ data.tar.gz: ca88e6a7e258f147d022391c671a35fa14c2aa39e1d1721bfe0c5f54dbbf382672269e1c167b4f38b34c10eb8a513561b3a5fbf425c0c3f3b0352a38bbfa34c6
@@ -1,5 +1,58 @@
1
1
  class Pizza
2
- def self.hi
3
- p 'hola'
2
+
3
+ TOPPINGS = ["Anchovies", "Bacon", "Beef", "Chorizo", "Ham", "Meatballs", "Pepperoni", "Proscuitto", "Sausage", "Basil", "Bay Leaf", "Dried Chili", "Chives", "Cilantro", "Garlic", "Oregano", "Parsley", "Pepper", "Artichoke Hearts", "Avocado", "Broccoli", "Capers", "Capicolla", "Cherry Tomatoes", "Eggplant", "Green Peppers", "Jalapeno Peppers", "Mushrooms", "Olives", "Onions", "Pineapple", "Red Onions", "Red Peppers", "Roasted Garlic", "Spinach", "Zucchini"]
4
+ CRUSTS = ["Deep Dish", "Double Decker", "Pan", "Thin Crust", "Hand Tossed", "Ultra Thin Crust"]
5
+ CHEESES = ["Cheddar", "Feta", "Goat Cheese", "Monetery Jack", "Parmesan", "Provolone", "Ricotta"]
6
+ SAUCES = ["Tomato", "Marinera", "White Sauce", "Pesto"]
7
+
8
+ attr_reader :toppings, :cheese, :sauce, :crust
9
+
10
+ def initialize(toppings, cheese, sauce, crust)
11
+ @toppings = toppings
12
+ @cheese = cheese
13
+ @sauce = sauce
14
+ @crust = crust
15
+ end
16
+
17
+ def self.generate(quantity=2)
18
+
19
+ toppings = Pizza.toppings(quantity)
20
+ cheese = Pizza.cheese
21
+ sauce = Pizza.sauce
22
+ crust = Pizza.crust
23
+
24
+ Pizza.new(toppings, cheese, sauce, crust)
25
+
4
26
  end
5
- end
27
+
28
+ def ingredients
29
+ pizza_hash = {
30
+ toppings: @toppings,
31
+ cheese: @cheese,
32
+ sauce: @sauce,
33
+ crust: @crust
34
+ }
35
+
36
+ return pizza_hash
37
+ end
38
+
39
+ private
40
+ class << self
41
+
42
+ def toppings(quantity)
43
+ TOPPINGS.sample(quantity)
44
+ end
45
+
46
+ def cheese
47
+ CHEESES.sample
48
+ end
49
+
50
+ def sauce
51
+ SAUCES.sample
52
+ end
53
+
54
+ def crust
55
+ CRUSTS.sample
56
+ end
57
+ end
58
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pizza-generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ian Matthews and no one else