Sha256: 09790b629901febe7cd7a93baa89bf5a65718e377dc9d41fc55460b03b3c51af
Contents?: true
Size: 989 Bytes
Versions: 4
Compression:
Stored size: 989 Bytes
Contents
# encoding: utf-8 module FFaker 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.to_s (number_of_phrases - 1).times do |s| s = " #{fetch_sample(CHEESY_PHRASES)}" p << s end p << '.' end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
ffaker-2.6.0 | lib/ffaker/cheesy_lingo.rb |
ffaker-2.5.0 | lib/ffaker/cheesy_lingo.rb |
ffaker-2.4.0 | lib/ffaker/cheesy_lingo.rb |
ffaker-2.3.0 | lib/ffaker/cheesy_lingo.rb |