Module: Dummy::Lorem

Extended by:
Lorem
Included in:
Lorem
Defined in:
lib/dummy/lorem.rb

Overview

Based on Perl’s Text::Lorem

Instance Method Summary collapse

Instance Method Details

#paragraphObject



15
16
17
# File 'lib/dummy/lorem.rb', line 15

def paragraph
  (1..3).map { sentences }.join(" ")
end

#paragraphsObject



19
20
21
# File 'lib/dummy/lorem.rb', line 19

def paragraphs
  (1..3).map { paragraph }.join(" ") # removing \n because of ruby's syck bug
end

#sentenceObject



6
7
8
9
# File 'lib/dummy/lorem.rb', line 6

def sentence
  s = words.join(" ").capitalize!
  "#{s}."
end

#sentencesObject



11
12
13
# File 'lib/dummy/lorem.rb', line 11

def sentences
  (1..3).map { sentence }.join(" ")
end