Method: Forgery::LoremIpsum.text

Defined in:
lib/forgery/forgery/lorem_ipsum.rb

.text(what = :sentence, quantity = 2, options = {}) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/forgery/forgery/lorem_ipsum.rb', line 3

def self.text(what=:sentence, quantity=2, options={})
  case what
  when :character
    character(options)
  when :characters
    characters(quantity, options)
  when :word
    word(options)
  when :words
    words(quantity, options)
  when :sentence
    sentence(options)
  when :sentences
    sentences(quantity, options)
  when :paragraph
    paragraph(options)
  when :paragraphs
    paragraphs(quantity, options)
  when :title
    title(options)
  end
end