Module: FFaker::LoremJA

Extended by:
LoremJA, ModuleUtils
Included in:
LoremJA
Defined in:
lib/ffaker/lorem_ja.rb

Instance Method Summary collapse

Methods included from ModuleUtils

const_missing, k, luhn_check, underscore, unique

Methods included from RandomUtils

#fetch_sample, #rand, #shuffle

Instance Method Details

#characterObject



8
9
10
# File 'lib/ffaker/lorem_ja.rb', line 8

def character
  fetch_sample(CHARACTERS)
end

#characters(count = 20) ⇒ Object



12
13
14
# File 'lib/ffaker/lorem_ja.rb', line 12

def characters(count = 20)
  fetch_sample(CHARACTERS, count: count).join
end

#paragraph(sentence_count = 3) ⇒ Object



32
33
34
# File 'lib/ffaker/lorem_ja.rb', line 32

def paragraph(sentence_count = 3)
  "#{sentences(sentence_count).join('')}#{fetch_sample(SENTENCES_END)}"
end

#paragraphs(count = 3) ⇒ Object



36
37
38
# File 'lib/ffaker/lorem_ja.rb', line 36

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

#sentenceObject



24
25
26
# File 'lib/ffaker/lorem_ja.rb', line 24

def sentence
  fetch_sample(SENTENCES)
end

#sentences(count = 3) ⇒ Object



28
29
30
# File 'lib/ffaker/lorem_ja.rb', line 28

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

#wordObject



16
17
18
# File 'lib/ffaker/lorem_ja.rb', line 16

def word
  fetch_sample(WORDS)
end

#words(count = 3) ⇒ Object



20
21
22
# File 'lib/ffaker/lorem_ja.rb', line 20

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