Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better docs for Faker::Food.description #1121

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions lib/faker/food.rb
Original file line number Diff line number Diff line change
@@ -1,34 +1,42 @@
module Faker
class Food < Base
class << self
# Retrieves a typical dish from each country
def dish
fetch('food.dish')
end

# Retrieves a description about some dish
def description
fetch('food.descriptions')
end

# Retrieves an ingredient
def ingredient
fetch('food.ingredients')
end

# Retrieves a fruit
def fruits
fetch('food.fruits')
end

# Retrieves a vegetable
def vegetables
fetch('food.vegetables')
end

# Retrieves some random spice
def spice
fetch('food.spices')
end

# Retrieves cooking measures
def measurement
fetch('food.measurement_sizes') + ' ' + fetch('food.measurements')
end

# Retrieves metric mesurements
def metric_measurement
fetch('food.metric_measurements')
end
Expand Down