class Faker::Books::Lovecraft

def sentence(word_count: 4, random_words_to_add: 6, open_compounds_allowed: true)

Returns:
  • (String) -

Parameters:
  • open_compounds_allowed (Boolean) -- If true, generated sentence can contain words having additional spaces
  • random_words_to_add (Integer) --
  • word_count (Integer) -- The number of words to have in the sentence
def sentence(word_count: 4, random_words_to_add: 6, open_compounds_allowed: true)
  "#{words(number: word_count + rand(random_words_to_add.to_i).to_i, spaces_allowed: open_compounds_allowed).join(' ').capitalize}."
end