class Faker::Hipster
def sentence(word_count: 4, supplemental: false, random_words_to_add: 6, open_compounds_allowed: true)
-
(String)
-
Parameters:
-
open_compounds_allowed
(Boolean
) -- Specifies if the generated sentence can contain words having additional spaces -
random_words_to_add
(Integer
) -- Specifies the number of random words to add -
supplemental
(Boolean
) -- Specifies if the words are supplemental -
word_count
(Integer
) -- Specifies the number of words in the sentence
def sentence(word_count: 4, supplemental: false, random_words_to_add: 6, open_compounds_allowed: true) "#{words(number: word_count + rand(random_words_to_add.to_i).to_i, supplemental: supplemental, spaces_allowed: open_compounds_allowed).join(' ').capitalize}." end