Module: FFaker::LoremIE

Extended by:
LoremIE, ModuleUtils
Included in:
LoremIE
Defined in:
lib/ffaker/lorem_ie.rb

Instance Method Summary collapse

Methods included from ModuleUtils

const_missing, k, underscore, unique

Methods included from RandomUtils

#fetch_sample, #rand, #shuffle

Instance Method Details

#paragraphObject


29
30
31
# File 'lib/ffaker/lorem_ie.rb', line 29

def paragraph
  fetch_sample(PARAGRAPHS)
end

#paragraphs(paragraph_count = 3) ⇒ Object


33
34
35
# File 'lib/ffaker/lorem_ie.rb', line 33

def paragraphs(paragraph_count = 3)
  (1..paragraph_count).map { paragraph }
end

#questionObject


37
38
39
# File 'lib/ffaker/lorem_ie.rb', line 37

def question
  fetch_sample(QUESTIONS)
end

#sentenceObject Also known as: phrase


17
18
19
# File 'lib/ffaker/lorem_ie.rb', line 17

def sentence
  fetch_sample(SENTENCES)
end

#sentences(sentence_count = 3) ⇒ Object Also known as: phrases


23
24
25
# File 'lib/ffaker/lorem_ie.rb', line 23

def sentences(sentence_count = 3)
  (1..sentence_count).map { fetch_sample(SENTENCES) }
end

#wordObject


9
10
11
# File 'lib/ffaker/lorem_ie.rb', line 9

def word
  fetch_sample(WORDS)
end

#words(num = 3) ⇒ Object


13
14
15
# File 'lib/ffaker/lorem_ie.rb', line 13

def words(num = 3)
  fetch_sample(WORDS, count: num)
end