Class: Faker::Restaurant

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

Constant Summary

Constants inherited from Base

Base::LLetters, Base::Letters, Base::NOT_GIVEN, Base::Numbers, Base::ULetters

Class Method Summary collapse

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, translate, unique, with_locale

Class Method Details

.descriptionString

Produces a description of a restaurant.

Examples:

Faker::Restaurant.description
  #=> "We are committed to using the finest ingredients in our recipes. No food leaves our kitchen that we ourselves would not eat."

Returns:

  • (String)

Available since:

  • 1.9.2



44
45
46
# File 'lib/faker/default/restaurant.rb', line 44

def description
  fetch('restaurant.description')
end

.nameString

Produces the name of a restaurant.

Examples:

Faker::Restaurant.name #=> "Curry King"

Returns:

  • (String)

Available since:

  • 1.9.2



17
18
19
# File 'lib/faker/default/restaurant.rb', line 17

def name
  bothify(parse('restaurant.name'))
end

.reviewString

Produces a review for a restaurant.

Examples:

Faker::Restaurant.review
  #=> "Brand new. Great design. Odd to hear pop music in a Mexican establishment. Music is a bit loud. It should be background."

Returns:

  • (String)

Available since:

  • 1.9.2



58
59
60
# File 'lib/faker/default/restaurant.rb', line 58

def review
  fetch('restaurant.review')
end

.typeString

Produces a type of restaurant.

Examples:

Faker::Restaurant.type #=> "Comfort Food"

Returns:

  • (String)

Available since:

  • 1.9.2



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

def type
  fetch('restaurant.type')
end