Module: Crazipsum

Defined in:
lib/crazipsum.rb,
lib/crazipsum/version.rb,
lib/crazipsum/registry.rb,
lib/crazipsum/generator.rb,
lib/crazipsum/dictionnary.rb

Overview

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

Defined Under Namespace

Classes: Dictionnary, Generator, Registry

Constant Summary collapse

VERSION =
'0.2.0'

Class Method Summary collapse

Class Method Details

.register(type, words, fillers: DEFAULT_FILLERS) ⇒ Object

Registers a new type of Dictionnary that can later be retrieved with Crazipsum().

Parameters:

  • type (String, Symbol)

    a name for that dictionnary. This type will be used later when calling ‘Crazipsum(type)`.

  • words (Array<String>)

    a list of words used when generating the lorem ipsum.

  • fillers (Array<String>) (defaults to: DEFAULT_FILLERS)

    a list of words used to fill in the sentences when generating the lorem ipsum.



19
20
21
# File 'lib/crazipsum.rb', line 19

def register(type, words, fillers: DEFAULT_FILLERS)
  Crazipsum::Registry.instance.register(type, words, fillers: fillers)
end