class Object

Constants

DEFAULT_FILLERS

Public Instance Methods

Crazipsum(type) click to toggle source

Returns a lorem ipsum generator which will generate lorem ipsums of the given type.

There are a few default types registered:

  • `car_make`

  • `phobia`

  • `programming_language`

  • `animal`

  • `fruit`

  • `constellation`

  • `mineral`

  • `religion`

  • `country`

You can register new types of lorem ipsum via `Crazipsum.register(type, words, fillers: fillers)`.

@param type [Symbol,String] the type of lorem ipsum you'd like to generate. @return [Crazipsum::Generator] a funky lorem ipsum generator.

# File lib/crazipsum.rb, line 42
def Crazipsum(type) # rubocop:disable Naming/MethodName
  dictionnary = Crazipsum::Registry.instance[type]
  raise ArgumentError, 'unregistered ipsum type' if dictionnary.nil?

  Crazipsum::Generator.new(dictionnary)
end