Project

blasphemy

0.01
No commit activity in last 3 years
No release in over 3 years
Surprise everyone by stubbing placeholder texts with something more original than boring "Lorem ipsum dolor sit amet". Embrace and extend, creating own wordlists for hilarious (or blasphemous or whatever you like) generated texts.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

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.