forked from elixirs/faker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfood.ex
143 lines (118 loc) · 3.18 KB
/
food.ex
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
defmodule Faker.Food do
import Faker, only: [localize: 1]
@moduledoc """
Functions for generating food data.
"""
@doc """
Returns a random complete dish.
## Examples
iex> Faker.Food.dish()
"Vegetable Soup"
iex> Faker.Food.dish()
"Fish and chips"
iex> Faker.Food.dish()
"Pork belly buns"
iex> Faker.Food.dish()
"Pasta Carbonara"
"""
@spec dish() :: String.t()
localize(:dish)
@doc """
Returns a random description.
## Examples
iex> Faker.Food.description()
"Two buttermilk waffles, topped with whipped cream and maple syrup, a side of two eggs served any style, and your choice of smoked bacon or smoked ham."
iex> Faker.Food.description()
"28-day aged 300g USDA Certified Prime Ribeye, rosemary-thyme garlic butter, with choice of two sides."
iex> Faker.Food.description()
"Breaded fried chicken with waffles, and a side of maple syrup."
iex> Faker.Food.description()
"Creamy mascarpone cheese and custard layered between espresso and rum soaked house-made ladyfingers, topped with Valrhona cocoa powder."
"""
@spec description() :: String.t()
localize(:description)
@doc """
Returns a random ingredient.
## Examples
iex> Faker.Food.ingredient()
"Tomatoes"
iex> Faker.Food.ingredient()
"Albacore Tuna"
iex> Faker.Food.ingredient()
"Potatoes"
iex> Faker.Food.ingredient()
"Tinned"
"""
@spec ingredient() :: String.t()
localize(:ingredient)
@doc """
Returns a random spicy ingredient.
## Examples
iex> Faker.Food.spice()
"Garlic Salt"
iex> Faker.Food.spice()
"Ras-el-Hanout"
iex> Faker.Food.spice()
"Curry Hot"
iex> Faker.Food.spice()
"Peppercorns Mixed"
"""
@spec spice() :: String.t()
localize(:spice)
@doc """
Returns a random measurement.
## Examples
iex> Faker.Food.measurement()
"teaspoon"
iex> Faker.Food.measurement()
"gallon"
iex> Faker.Food.measurement()
"pint"
iex> Faker.Food.measurement()
"cup"
"""
@spec measurement() :: String.t()
localize(:measurement)
@doc """
Returns a random measurement size.
## Examples
iex> Faker.Food.measurement_size()
"1/4"
iex> Faker.Food.measurement_size()
"3"
iex> Faker.Food.measurement_size()
"1"
iex> Faker.Food.measurement_size()
"1/2"
"""
@spec measurement_size() :: String.t()
localize(:measurement_size)
@doc """
Returns a random metric measurement.
## Examples
iex> Faker.Food.metric_measurement()
"centiliter"
iex> Faker.Food.metric_measurement()
"deciliter"
iex> Faker.Food.metric_measurement()
"liter"
iex> Faker.Food.metric_measurement()
"milliliter"
"""
@spec metric_measurement() :: String.t()
localize(:metric_measurement)
@doc """
Returns a type of sushi.
## Examples
iex> Faker.Food.sushi()
"Whitespotted conger"
iex> Faker.Food.sushi()
"Japanese horse mackerel"
iex> Faker.Food.sushi()
"Salmon"
iex> Faker.Food.sushi()
"Octopus"
"""
@spec sushi() :: String.t()
localize(:sushi)
end