¶ ↑
BlasphemyA 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.
¶ ↑
UsagePretty straightforward Ruby here.
¶ ↑
Using built-in MetalIpsumIt’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-listThere 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 classFor 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 ideasContact me via github PM or e-mail. I don’t have any specific idea on direction this little gem should be going.
¶ ↑
CopyrightCopyright © 2010 Tomasz Stachewicz. See LICENSE for details.