Module: FFaker::FoodPL

Extended by:
FoodPL, ModuleUtils
Included in:
FoodPL
Defined in:
lib/ffaker/food_pl.rb

Instance Method Summary collapse

Methods included from ModuleUtils

const_missing, k, luhn_check, underscore, unique

Methods included from RandomUtils

#fetch_sample, #rand, #shuffle

Instance Method Details

#diaryObject



57
58
59
# File 'lib/ffaker/food_pl.rb', line 57

def diary
  fetch_sample(DIARY)
end

#fermentedObject



53
54
55
# File 'lib/ffaker/food_pl.rb', line 53

def fermented
  fetch_sample(FERMENTED)
end

#foodObject



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

#fruitObject



37
38
39
# File 'lib/ffaker/food_pl.rb', line 37

def fruit
  fetch_sample(FRUITS)
end

#herbObject



41
42
43
# File 'lib/ffaker/food_pl.rb', line 41

def herb
  fetch_sample(HERBS)
end

#meatObject



49
50
51
# File 'lib/ffaker/food_pl.rb', line 49

def meat
  fetch_sample(MEATS)
end

#preservesObject



61
62
63
# File 'lib/ffaker/food_pl.rb', line 61

def preserves
  fetch_sample(PRESERVES)
end

#processedObject



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

#spiceObject



45
46
47
# File 'lib/ffaker/food_pl.rb', line 45

def spice
  fetch_sample(SPICES)
end

#unprocessedObject



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

#vegetableObject



33
34
35
# File 'lib/ffaker/food_pl.rb', line 33

def vegetable
  fetch_sample(VEGETABLES)
end