Method: FFakerTW::HTMLIpsum#p

Defined in:
lib/ffakerTW/html_ipsum.rb

#p(count = 3, options = {}) ⇒ Object



14
15
16
17
18
19
20
21
22
23
# File 'lib/ffakerTW/html_ipsum.rb', line 14

def p(count = 3, options = {})
  options = { fancy: false, include_breaks: false }.merge(options)
  if options[:fancy]
    s = fancy_string(count, options[:include_breaks])
  else
    mode = options[:include_breaks] ? 'paragraphs' : 'paragraph'
    s = send(mode.to_sym, count)
  end
  (:p, s)
end