Module: Dummy::Lorem
Overview
Based on Perl’s Text::Lorem
Instance Method Summary collapse
Instance Method Details
#paragraph ⇒ Object
15 16 17 |
# File 'lib/dummy/lorem.rb', line 15 def paragraph (1..3).map { sentences }.join(" ") end |
#paragraphs ⇒ Object
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 |
#sentence ⇒ Object
6 7 8 9 |
# File 'lib/dummy/lorem.rb', line 6 def sentence s = words.join(" ").capitalize! "#{s}." end |
#sentences ⇒ Object
11 12 13 |
# File 'lib/dummy/lorem.rb', line 11 def sentences (1..3).map { sentence }.join(" ") end |