Skip to content

Commit

Permalink
Add ethnic category to the food generator (#2361)
Browse files Browse the repository at this point in the history
* Add food ethnic category to the faker gem

* Add food ethnic type for next faker version
  • Loading branch information
wolwire committed Aug 19, 2021
1 parent 30e5215 commit 4e4acaf
Show file tree
Hide file tree
Showing 4 changed files with 1,073 additions and 10 deletions.
2 changes: 2 additions & 0 deletions doc/default/food.md
Expand Up @@ -7,6 +7,8 @@ Faker::Food.description #=> "Three eggs with cilantro, tomatoes, onions, avocado

Faker::Food.dish #=> "Caesar Salad"

Faker::Food.ethnic_category #=> "Indian cuisine"

Faker::Food.fruits #=> "Peaches"

Faker::Food.ingredient #=> "Adzuki Beans"
Expand Down
13 changes: 13 additions & 0 deletions lib/faker/default/food.rb
Expand Up @@ -108,6 +108,19 @@ def measurement
def metric_measurement
fetch('food.metric_measurements')
end

##
# Retrieves ethnic category
#
# @return [String]
#
# @example
# Faker::Food.ethnic_category #=> "Indian cuisine"
#
# @faker.version next
def ethnic_category
fetch('food.ethnic_category')
end
end
end
end

0 comments on commit 4e4acaf

Please sign in to comment.