Class: Faker::Tea
Constant Summary
Constants inherited from Base
Base::LLetters, Base::Letters, Base::NOT_GIVEN, Base::Numbers, Base::ULetters
Class Method Summary collapse
-
.type ⇒ String
Produces a random type of tea.
-
.variety(type: nil) ⇒ String
Produces a random variety or blend of tea.
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, shuffle!, translate, unique, with_locale
Class Method Details
.type ⇒ String
Produces a random type of tea.
36 37 38 |
# File 'lib/faker/default/tea.rb', line 36 def type fetch 'tea.type' end |
.variety(type: nil) ⇒ String
Produces a random variety or blend of tea.
22 23 24 25 |
# File 'lib/faker/default/tea.rb', line 22 def variety(type: nil) type ||= fetch('tea.type') fetch "tea.variety.#{type.downcase}" end |