Sha256: 5c44eabf7dc36821b082ed9618bebb71a41be40e4a5e22db22d2b4228a50f8f7
Contents?: true
Size: 964 Bytes
Versions: 9
Compression:
Stored size: 964 Bytes
Contents
# frozen_string_literal: true module FFakerTW module CheesyLingo # Born during RailsGirls Summer of Code 2015. Team Cheesy says Hi! extend ModuleUtils extend self TITLE_1 = %w[Sharp Soft Nutty Smokey Melting Cheeky Fat Dutch Grated Cheesed Milky].freeze TITLE_2 = %w[Gouda Affineurs Alpine Sheep Cows Brie Goats Coulommiers Dairy].freeze def title "#{fetch_sample(TITLE_1)} #{fetch_sample(TITLE_2)}" end def word fetch_sample(CHEESY_WORDS) end def words(count = 5) fetch_sample(CHEESY_WORDS, count: count) end def sentence [ fetch_sample(CHEESY_PHRASES).capitalize, fetch_sample(CHEESY_PHRASES), fetch_sample(CHEESY_PHRASES) ].join + '.' end def paragraph(number_of_phrases = 10) p = +fetch_sample(CHEESY_PHRASES).capitalize (number_of_phrases - 1).times { p << " #{fetch_sample(CHEESY_PHRASES)}" } p << '.' end end end
Version data entries
9 entries across 9 versions & 1 rubygems