Skip to content

tomash/blasphemy

Repository files navigation

Blasphemy

A kind of… different Lorem Ipsum generator. Easily extensible. Surprise your client with thinking out of the box and stub texts with something more original than boring “Lorem ipsum dolor sit amet”.

You can call it a “framework” (wo ho hoo!) for building own Lorem Ipsum generators. We all now it’s just for building and spewing surprisingly elaborate random curses.

Basically it all started as a joke gist inspired by John Mettraux who, in turn, suggested the idea after I’ve tweeted a link to Lorizzle.

Usage

Pretty straightforward Ruby here.

Using built-in MetalIpsum

It’s in the Faker module space, to pay homage and avoid collisions. However it doesn’t require original Faker and is purely self-contained.

require 'blasphemy'
generator = Faker::MetalIpsum.new
generator.paragraph
generator.sentence
generator.words

Own word-list

There is a class TabulaIpsum with an empty wordlist, waiting to be filled with any words you like.

generator = Faker::TabulaIpsum.new
generator.wordlist = ['lol', 'rotfl', 'omg', 'wtf']

Own generator class

For some more persistence, create a class like this

module Faker
  class MarketingIpsum < CustomIpsum
    def initialize
      @wordlist = ['success', 'patenting', 'innovative', 'milestone']
    end
  end
end

And use it like all the other above.

Forking and ideas

Contact me via github PM or e-mail. I don’t have any specific idea on direction this little gem should be going.

Copyright © 2010 Tomasz Stachewicz. See LICENSE for details.

About

a different Lorem Ipsum generator

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages