lib/faker/default/tea.rb
# frozen_string_literal: true module Faker class Tea < Base flexible :tea class << self ## # Produces a random variety or blend of tea. # # @param type [String, nil] the type of tea to query for (valid types: 'Black', 'Green', 'Oolong', 'White', and 'Herbal') # @return [String] a variety of tea # # @example # Faker::Tea.variety # #=> "Earl Grey" # # @example # Faker::Tea.variety(type: 'Green') # #=> "Jasmine" # @faker.version next def variety(type: nil) type ||= fetch('tea.type') fetch "tea.variety.#{type.downcase}" end ## # Produces a random type of tea. # # @return [String] a type of tea # # @example # Faker::Tea.type # #=> "Green" # @faker.version next def type fetch 'tea.type' end end end end
Source Files
- lib/faker.rb
- lib/faker/blockchain/aeternity.rb
- lib/faker/blockchain/bitcoin.rb
- lib/faker/blockchain/ethereum.rb
- lib/faker/blockchain/tezos.rb
- lib/faker/books/book.rb
- lib/faker/books/culture_series.rb
- lib/faker/books/dune.rb
- lib/faker/books/lovecraft.rb
- lib/faker/books/the_kingkiller_chronicle.rb
- lib/faker/creature/animal.rb
- lib/faker/creature/bird.rb
- lib/faker/creature/cat.rb
- lib/faker/creature/dog.rb
- lib/faker/creature/horse.rb
- lib/faker/default/address.rb
- lib/faker/default/alphanumeric.rb
- lib/faker/default/ancient.rb
- lib/faker/default/app.rb
- lib/faker/default/appliance.rb
- lib/faker/default/artist.rb
- lib/faker/default/avatar.rb
- lib/faker/default/bank.rb
- lib/faker/default/barcode.rb
- lib/faker/default/beer.rb
- lib/faker/default/blood.rb
- lib/faker/default/boolean.rb
- lib/faker/default/bossa_nova.rb
- lib/faker/default/business.rb
- lib/faker/default/camera.rb
- lib/faker/default/cannabis.rb
- lib/faker/default/chile_rut.rb
- lib/faker/default/chuck_norris.rb
- lib/faker/default/code.rb
- lib/faker/default/coffee.rb
- lib/faker/default/coin.rb
- lib/faker/default/color.rb
- lib/faker/default/commerce.rb
- lib/faker/default/company.rb
- lib/faker/default/compass.rb
- lib/faker/default/computer.rb
- lib/faker/default/construction.rb
- lib/faker/default/cosmere.rb
- lib/faker/default/crypto.rb
- lib/faker/default/crypto_coin.rb
- lib/faker/default/currency.rb
- lib/faker/default/date.rb
- lib/faker/default/dc_comics.rb
- lib/faker/default/demographic.rb
- lib/faker/default/dessert.rb
- lib/faker/default/device.rb
- lib/faker/default/driving_licence.rb
- lib/faker/default/drone.rb
- lib/faker/default/educator.rb
- lib/faker/default/electrical_components.rb
- lib/faker/default/emotion.rb
- lib/faker/default/esport.rb
- lib/faker/default/faker_adjective.rb
- lib/faker/default/file.rb
- lib/faker/default/fillmurray.rb
- lib/faker/default/finance.rb
- lib/faker/default/food.rb
- lib/faker/default/funny_name.rb
- lib/faker/default/gender.rb
- lib/faker/default/greek_philosophers.rb
- lib/faker/default/hacker.rb
- lib/faker/default/hipster.rb
- lib/faker/default/hobby.rb
- lib/faker/default/house.rb
- lib/faker/default/id_number.rb
- lib/faker/default/industry_segments.rb
- lib/faker/default/internet.rb
- lib/faker/default/internet_http.rb
- lib/faker/default/invoice.rb
- lib/faker/default/job.rb
- lib/faker/default/json.rb
- lib/faker/default/kpop.rb
- lib/faker/default/lorem.rb
- lib/faker/default/lorem_flickr.rb
- lib/faker/default/lorem_pixel.rb
- lib/faker/default/markdown.rb
- lib/faker/default/marketing.rb
- lib/faker/default/measurement.rb
- lib/faker/default/military.rb
- lib/faker/default/mountain.rb
- lib/faker/default/name.rb
- lib/faker/default/nation.rb
- lib/faker/default/nato_phonetic_alphabet.rb
- lib/faker/default/nhs.rb
- lib/faker/default/number.rb
- lib/faker/default/omniauth.rb
- lib/faker/default/phone_number.rb
- lib/faker/default/placeholdit.rb
- lib/faker/default/programming_language.rb
- lib/faker/default/relationship.rb
- lib/faker/default/religion.rb
- lib/faker/default/restaurant.rb
- lib/faker/default/science.rb
- lib/faker/default/slack_emoji.rb
- lib/faker/default/source.rb
- lib/faker/default/south_africa.rb
- lib/faker/default/space.rb
- lib/faker/default/string.rb
- lib/faker/default/stripe.rb
- lib/faker/default/subscription.rb
- lib/faker/default/superhero.rb
- lib/faker/default/tea.rb
- lib/faker/default/team.rb
- lib/faker/default/time.rb
- lib/faker/default/twitter.rb
- lib/faker/default/types.rb
- lib/faker/default/university.rb
- lib/faker/default/vehicle.rb
- lib/faker/default/verb.rb
- lib/faker/default/world_cup.rb
- lib/faker/fantasy/tolkien.rb
- lib/faker/games/clash_of_clans.rb
- lib/faker/games/control.rb
- lib/faker/games/dnd.rb
- lib/faker/games/dota.rb
- lib/faker/games/elder_scrolls.rb
- lib/faker/games/fallout.rb
- lib/faker/games/game.rb
- lib/faker/games/half_life.rb
- lib/faker/games/heroes.rb
- lib/faker/games/heroes_of_the_storm.rb
- lib/faker/games/league_of_legends.rb
- lib/faker/games/minecraft.rb
- lib/faker/games/myst.rb
- lib/faker/games/overwatch.rb
- lib/faker/games/pokemon.rb
- lib/faker/games/sonic_the_hedgehog.rb
- lib/faker/games/street_fighter.rb
- lib/faker/games/super_mario.rb
- lib/faker/games/super_smash_bros.rb
- lib/faker/games/touhou.rb
- lib/faker/games/warhammer_fantasy.rb
- lib/faker/games/witcher.rb
- lib/faker/games/world_of_warcraft.rb
- lib/faker/games/zelda.rb
- lib/faker/japanese_media/conan.rb
- lib/faker/japanese_media/doraemon.rb
- lib/faker/japanese_media/dragon_ball.rb
- lib/faker/japanese_media/fullmetal_alchemist_brotherhood.rb
- lib/faker/japanese_media/kamen_rider.rb
- lib/faker/japanese_media/naruto.rb
- lib/faker/japanese_media/one_piece.rb
- lib/faker/japanese_media/studio_ghibli.rb
- lib/faker/japanese_media/sword_art_online.rb
- lib/faker/locations/australia.rb
- lib/faker/movies/back_to_the_future.rb
- lib/faker/movies/departed.rb
- lib/faker/movies/ghostbusters.rb
- lib/faker/movies/harry_potter.rb
- lib/faker/movies/hitchhikers_guide_to_the_galaxy.rb
- lib/faker/movies/hobbit.rb
- lib/faker/movies/how_to_train_your_dragon.rb
- lib/faker/movies/lebowski.rb
- lib/faker/movies/lord_of_the_rings.rb
- lib/faker/movies/movie.rb
- lib/faker/movies/princess_bride.rb
- lib/faker/movies/room.rb
- lib/faker/movies/star_wars.rb
- lib/faker/movies/tron.rb
- lib/faker/movies/v_for_vendetta.rb
- lib/faker/music/grateful_dead.rb
- lib/faker/music/hiphop.rb
- lib/faker/music/music.rb
- lib/faker/music/opera.rb
- lib/faker/music/pearl_jam.rb
- lib/faker/music/phish.rb
- lib/faker/music/prince.rb
- lib/faker/music/rock_band.rb
- lib/faker/music/rush.rb
- lib/faker/music/show.rb
- lib/faker/music/umphreys_mcgee.rb
- lib/faker/quotes/chiquito.rb
- lib/faker/quotes/quote.rb
- lib/faker/quotes/rajnikanth.rb
- lib/faker/quotes/shakespeare.rb
- lib/faker/religion/bible.rb
- lib/faker/sports/basketball.rb
- lib/faker/sports/football.rb
- lib/faker/sports/volleyball.rb
- lib/faker/tv_shows/aqua_teen_hunger_force.rb
- lib/faker/tv_shows/big_bang_theory.rb
- lib/faker/tv_shows/bojack_horseman.rb
- lib/faker/tv_shows/breaking_bad.rb
- lib/faker/tv_shows/brooklyn_nine_nine.rb
- lib/faker/tv_shows/buffy.rb
- lib/faker/tv_shows/community.rb
- lib/faker/tv_shows/dr_who.rb
- lib/faker/tv_shows/dumb_and_dumber.rb
- lib/faker/tv_shows/family_guy.rb
- lib/faker/tv_shows/final_space.rb
- lib/faker/tv_shows/friends.rb
- lib/faker/tv_shows/futurama.rb
- lib/faker/tv_shows/game_of_thrones.rb
- lib/faker/tv_shows/hey_arnold.rb
- lib/faker/tv_shows/how_i_met_your_mother.rb
- lib/faker/tv_shows/michael_scott.rb
- lib/faker/tv_shows/new_girl.rb
- lib/faker/tv_shows/parks_and_rec.rb
- lib/faker/tv_shows/rick_and_morty.rb
- lib/faker/tv_shows/ru_paul.rb
- lib/faker/tv_shows/seinfeld.rb
- lib/faker/tv_shows/silicon_valley.rb
- lib/faker/tv_shows/simpsons.rb
- lib/faker/tv_shows/south_park.rb
- lib/faker/tv_shows/star_trek.rb
- lib/faker/tv_shows/stargate.rb
- lib/faker/tv_shows/stranger_things.rb
- lib/faker/tv_shows/suits.rb
- lib/faker/tv_shows/supernatural.rb
- lib/faker/tv_shows/the_expanse.rb
- lib/faker/tv_shows/the_fresh_prince_of_bel_air.rb
- lib/faker/tv_shows/the_it_crowd.rb
- lib/faker/tv_shows/the_office.rb
- lib/faker/tv_shows/the_thick_of_it.rb
- lib/faker/tv_shows/twin_peaks.rb
- lib/faker/tv_shows/venture_bros.rb
- lib/faker/version.rb
- lib/helpers/base58.rb
- lib/helpers/char.rb
- lib/helpers/unique_generator.rb