Module: FFaker::CheesyLingo

Extended by:
CheesyLingo, ModuleUtils
Included in:
CheesyLingo
Defined in:
lib/ffaker/cheesy_lingo.rb

Constant Summary collapse

TITLE_1 =
%w(Sharp Soft Nutty Smokey Melting Cheeky Fat Dutch Grated Cheesed Milky)
TITLE_2 =
%w(Gouda Affineurs Alpine Sheep Cows Brie Goats Coulommiers Dairy)

Instance Method Summary collapse

Methods included from ModuleUtils

const_missing, k, underscore

Instance Method Details

#paragraph(number_of_phrases = 10) ⇒ Object



29
30
31
32
33
34
35
36
# File 'lib/ffaker/cheesy_lingo.rb', line 29

def paragraph(number_of_phrases = 10)
  p = CHEESY_PHRASES.sample.capitalize.to_s
  (number_of_phrases - 1).times do |s|
    s = " #{CHEESY_PHRASES.sample}"
    p << s
  end
  p << '.'
end

#sentenceObject



25
26
27
# File 'lib/ffaker/cheesy_lingo.rb', line 25

def sentence
  "#{CHEESY_PHRASES.sample.capitalize} #{CHEESY_PHRASES.sample} #{CHEESY_PHRASES.sample}."
end

#titleObject



13
14
15
# File 'lib/ffaker/cheesy_lingo.rb', line 13

def title
  "#{TITLE_1.sample} #{TITLE_2.sample}"
end

#wordObject



17
18
19
# File 'lib/ffaker/cheesy_lingo.rb', line 17

def word
  CHEESY_WORDS.sample
end

#words(count = 5) ⇒ Object



21
22
23
# File 'lib/ffaker/cheesy_lingo.rb', line 21

def words(count = 5)
  CHEESY_WORDS.sample(count)
end