class Faker::Lorem

def sentence(legacy_word_count = NOT_GIVEN, legacy_supplemental = NOT_GIVEN, legacy_random_words_to_add = NOT_GIVEN, word_count: 4, supplemental: false, random_words_to_add: 0)

Experimental RBS support (using type sampling data from the type_fusion project).

def sentence: (?Object legacy_word_count, ?Object legacy_supplemental, ?Object legacy_random_words_to_add, word_count: Integer, supplemental: false, random_words_to_add: Integer) -> String

This signature was generated using 12 samples from 1 application.

Returns:
  • (String) -

Parameters:
  • random_words_to_add (Integer) -- Add any random words, default to 0
  • supplemental (Boolean) -- Add supplemental words, default to false
  • word_count (Integer) -- How many words should be there in a sentence, default to 4
def sentence(legacy_word_count = NOT_GIVEN, legacy_supplemental = NOT_GIVEN, legacy_random_words_to_add = NOT_GIVEN, word_count: 4, supplemental: false, random_words_to_add: 0)
  warn_for_deprecated_arguments do |keywords|
    keywords << :word_count if legacy_word_count != NOT_GIVEN
    keywords << :supplemental if legacy_supplemental != NOT_GIVEN
    keywords << :random_words_to_add if legacy_random_words_to_add != NOT_GIVEN
  end
  words(number: word_count + rand(random_words_to_add.to_i), supplemental: supplemental).join(locale_space).capitalize + locale_period
end