Class: Faker::Dessert

Inherits:
Base
  • Object
show all
Defined in:
lib/faker/default/dessert.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, letterify, method_missing, numerify, parse, rand, rand_in_range, regexify, resolve, respond_to_missing?, sample, shuffle, translate, unique, with_locale

Class Method Details

.flavorString

Produces the name of a dessert flavor.

Examples:

Faker::Dessert.flavor #=> "Salted Caramel"

Returns:

  • (String)

Available since:

  • 1.8.0


43
44
45
# File 'lib/faker/default/dessert.rb', line 43

def flavor
  fetch('dessert.flavor')
end

.toppingString

Produces the name of a dessert topping.

Examples:

Faker::Dessert.topping #=> "Gummy Bears"

Returns:

  • (String)

Available since:

  • 1.8.0


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

def topping
  fetch('dessert.topping')
end

.varietyString

Produces the name of a dessert variety.

Examples:

Faker::Dessert.variety #=> "Cake"

Returns:

  • (String)

Available since:

  • 1.8.0


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

def variety
  fetch('dessert.variety')
end