Class: Faker::Food
Constant Summary
Constants inherited from Base
Base::LLetters, Base::Letters, Base::NOT_GIVEN, Base::Numbers, Base::ULetters
Class Method Summary collapse
-
.allergen ⇒ String
Retrieves an allergen.
-
.description ⇒ String
Retrieves a description about some dish.
-
.dish ⇒ String
Retrieves a typical dish from each country.
-
.ethnic_category ⇒ String
Retrieves ethnic category.
-
.fruits ⇒ String
Retrieves a fruit.
-
.ingredient ⇒ String
Retrieves an ingredient.
-
.measurement ⇒ String
Retrieves cooking measures.
-
.metric_measurement ⇒ String
Retrieves metric measurements.
-
.spice ⇒ String
Retrieves some random spice.
-
.vegetables ⇒ String
Retrieves a vegetable.
Methods inherited from Base
bothify, disable_enforce_available_locales, fetch, fetch_all, flexible, generate, letterify, method_missing, numerify, parse, rand, rand_in_range, regexify, resolve, respond_to_missing?, sample, shuffle, shuffle!, translate, unique, with_locale
Class Method Details
.allergen ⇒ String
Retrieves an allergen.
17 18 19 |
# File 'lib/faker/default/food.rb', line 17 def allergen fetch('food.allergens') end |
.description ⇒ String
Retrieves a description about some dish
43 44 45 |
# File 'lib/faker/default/food.rb', line 43 def description fetch('food.descriptions') end |
.dish ⇒ String
Retrieves a typical dish from each country.
30 31 32 |
# File 'lib/faker/default/food.rb', line 30 def dish fetch('food.dish') end |
.ethnic_category ⇒ String
Retrieves ethnic category
134 135 136 |
# File 'lib/faker/default/food.rb', line 134 def ethnic_category fetch('food.ethnic_category') end |
.fruits ⇒ String
Retrieves a fruit
69 70 71 |
# File 'lib/faker/default/food.rb', line 69 def fruits fetch('food.fruits') end |
.ingredient ⇒ String
Retrieves an ingredient
56 57 58 |
# File 'lib/faker/default/food.rb', line 56 def ingredient fetch('food.ingredients') end |
.measurement ⇒ String
Retrieves cooking measures
108 109 110 |
# File 'lib/faker/default/food.rb', line 108 def measurement "#{fetch('food.measurement_sizes')} #{fetch('food.measurements')}" end |
.metric_measurement ⇒ String
Retrieves metric measurements
121 122 123 |
# File 'lib/faker/default/food.rb', line 121 def metric_measurement fetch('food.metric_measurements') end |
.spice ⇒ String
Retrieves some random spice
95 96 97 |
# File 'lib/faker/default/food.rb', line 95 def spice fetch('food.spices') end |
.vegetables ⇒ String
Retrieves a vegetable
82 83 84 |
# File 'lib/faker/default/food.rb', line 82 def vegetables fetch('food.vegetables') end |