Module: FFaker::FoodPL
Instance Method Summary
collapse
const_missing, k, luhn_check, underscore, unique
#fetch_sample, #rand, #shuffle
Instance Method Details
#diary ⇒ Object
57
58
59
|
# File 'lib/ffaker/food_pl.rb', line 57
def diary
fetch_sample(DIARY)
end
|
#fermented ⇒ Object
53
54
55
|
# File 'lib/ffaker/food_pl.rb', line 53
def fermented
fetch_sample(FERMENTED)
end
|
#food ⇒ Object
8
9
10
11
12
13
|
# File 'lib/ffaker/food_pl.rb', line 8
def food
case rand(0..1)
when 0 then processed
when 1 then unprocessed
end
end
|
#fruit ⇒ Object
37
38
39
|
# File 'lib/ffaker/food_pl.rb', line 37
def fruit
fetch_sample(FRUITS)
end
|
#herb ⇒ Object
41
42
43
|
# File 'lib/ffaker/food_pl.rb', line 41
def herb
fetch_sample(HERBS)
end
|
#meat ⇒ Object
49
50
51
|
# File 'lib/ffaker/food_pl.rb', line 49
def meat
fetch_sample(MEATS)
end
|
#preserves ⇒ Object
61
62
63
|
# File 'lib/ffaker/food_pl.rb', line 61
def preserves
fetch_sample(PRESERVES)
end
|
#processed ⇒ Object
15
16
17
18
19
20
21
|
# File 'lib/ffaker/food_pl.rb', line 15
def processed
case rand(0..2)
when 0 then fermented
when 1 then diary
when 2 then preserves
end
end
|
#spice ⇒ Object
45
46
47
|
# File 'lib/ffaker/food_pl.rb', line 45
def spice
fetch_sample(SPICES)
end
|
#unprocessed ⇒ Object
23
24
25
26
27
28
29
30
31
|
# File 'lib/ffaker/food_pl.rb', line 23
def unprocessed
case rand(0..4)
when 0 then vegetable
when 1 then fruit
when 2 then herb
when 3 then spice
when 4 then meat
end
end
|
#vegetable ⇒ Object
33
34
35
|
# File 'lib/ffaker/food_pl.rb', line 33
def vegetable
fetch_sample(VEGETABLES)
end
|