Crazipsum

travis Coverage Status Gem Version

Ever wanted some dumber, crazier (fancier?) lorem ipsum? Here you go!

Installation

Add this line to your application's Gemfile:

gem 'crazipsum'

And then execute:

$ bundle

Or install it yourself as:

$ gem install crazipsum

Usage

require 'crazipsum'

fruit_ipsum = Crazipsum(:fruit)

fruit_ipsum.sentence # => "Tangerine berry ut incididunt java-plum enim labore."

fruit_ipsum.sentence(word_count: 5) # => "Pummelo sed coconut veniam occaecat."

fruit_ipsum.sentence(word_count: 5, fillers: false) # => "Raspberry youngberry jujube tangerine pomegranate."

fruit_ipsum.sentence(word_count: 5, fillers: ["yum", "yum"]) # => "Yum mangosteen yum melon acaiberry."

fruit_ipsum.paragraph(sentence_count: 3, word_count: 2, fillers: false) # => "Grape lime. Elderberry tayberry. Date starfruit."

fruit_ipsum.paragraphs(word_count: 2, sentence_count: 2, paragraph_count: 2) # => "Apple starfruit. Dewberry cherimoya.\n\nTangelo apple. Persimmon tamarillo."

# Register a custom lorem ipsum.
Crazipsum.register(
  :superhero,
  ["Batman", "Superman", "Iron Man"]
)

Crazipsum(:superhero).sentence(word_count: 5) # => "Eiusmod laboris Iron Man Batman in."

The available dictionnaries are:

License

MIT

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/groyoh/crazipsum.