Class: Faker::Food

Inherits:
Base
  • Object
show all
Defined in:
lib/faker/food.rb

Constant Summary

Constants inherited from Base

Base::Letters, Base::Numbers, Base::ULetters

Class Method Summary collapse

Methods inherited from Base

bothify, fetch, fetch_all, flexible, letterify, method_missing, numerify, parse, rand, rand_in_range, regexify, respond_to_missing?, sample, shuffle, translate, unique, with_locale

Class Method Details

.descriptionObject

Retrieves a description about some dish



10
11
12
# File 'lib/faker/food.rb', line 10

def description
  fetch('food.descriptions')
end

.dishObject

Retrieves a typical dish from each country



5
6
7
# File 'lib/faker/food.rb', line 5

def dish
  fetch('food.dish')
end

.fruitsObject

Retrieves a fruit



20
21
22
# File 'lib/faker/food.rb', line 20

def fruits
  fetch('food.fruits')
end

.ingredientObject

Retrieves an ingredient



15
16
17
# File 'lib/faker/food.rb', line 15

def ingredient
  fetch('food.ingredients')
end

.measurementObject

Retrieves cooking measures



35
36
37
# File 'lib/faker/food.rb', line 35

def measurement
  fetch('food.measurement_sizes') + ' ' + fetch('food.measurements')
end

.metric_measurementObject

Retrieves metric mesurements



40
41
42
# File 'lib/faker/food.rb', line 40

def metric_measurement
  fetch('food.metric_measurements')
end

.spiceObject

Retrieves some random spice



30
31
32
# File 'lib/faker/food.rb', line 30

def spice
  fetch('food.spices')
end

.vegetablesObject

Retrieves a vegetable



25
26
27
# File 'lib/faker/food.rb', line 25

def vegetables
  fetch('food.vegetables')
end