Method: Faker::Lorem.question
- Defined in:
- lib/faker/default/lorem.rb
.question(word_count: 4, supplemental: false, random_words_to_add: 0, exclude_words: nil) ⇒ String
Returns the question with 4 words
216 217 218 |
# File 'lib/faker/default/lorem.rb', line 216 def question(word_count: 4, supplemental: false, random_words_to_add: 0, exclude_words: nil) words(number: word_count + rand(random_words_to_add), supplemental: supplemental, exclude_words: exclude_words).join(' ').capitalize + locale_question_mark end |