Module: FFaker::CheesyLingo
Constant Summary
collapse
- 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
Instance Method Summary
collapse
const_missing, k, luhn_check, underscore, unique
#fetch_sample, #rand, #shuffle
Instance Method Details
#paragraph(number_of_phrases = 10) ⇒ Object
33
34
35
36
37
|
# File 'lib/ffaker/cheesy_lingo.rb', line 33
def paragraph(number_of_phrases = 10)
p = +fetch_sample(CHEESY_PHRASES).capitalize
(number_of_phrases - 1).times { p << " #{fetch_sample(CHEESY_PHRASES)}" }
p << '.'
end
|
#sentence ⇒ Object
25
26
27
28
29
30
31
|
# File 'lib/ffaker/cheesy_lingo.rb', line 25
def sentence
"#{[
fetch_sample(CHEESY_PHRASES).capitalize,
fetch_sample(CHEESY_PHRASES),
fetch_sample(CHEESY_PHRASES)
].join}."
end
|
#title ⇒ Object
13
14
15
|
# File 'lib/ffaker/cheesy_lingo.rb', line 13
def title
"#{fetch_sample(TITLE_1)} #{fetch_sample(TITLE_2)}"
end
|
#word ⇒ Object
17
18
19
|
# File 'lib/ffaker/cheesy_lingo.rb', line 17
def word
fetch_sample(CHEESY_WORDS)
end
|
#words(count = 5) ⇒ Object
21
22
23
|
# File 'lib/ffaker/cheesy_lingo.rb', line 21
def words(count = 5)
fetch_sample(CHEESY_WORDS, count: count)
end
|