Method: Forgery::LoremIpsum.sentences

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

.sentences(quantity = 2, options = {}) ⇒ Object



50
51
52
53
54
# File 'lib/forgery/forgery/lorem_ipsum.rb', line 50

def self.sentences(quantity=2, options={})
  options.merge!(:random_limit => (dictionaries[:lorem_ipsum].length-quantity)) if quantity.is_a?(Integer)

  dictionaries[:lorem_ipsum][range_from_quantity(quantity, options)].join(" ")
end