Method: FFaker::HTMLIpsum#fancy_string

Defined in:
lib/ffaker/html_ipsum.rb

#fancy_string(count = 3, include_breaks = false) ⇒ Object



132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
# File 'lib/ffaker/html_ipsum.rb', line 132

def fancy_string(count = 3, include_breaks = false)
  sep = include_breaks ? '<br>' : ' '
  a = k([
    (:strong, words(2).capitalize!),
    (:em, paragraph),
    (:mark, paragraph),
    (:del, words(2)),
    (:ins, words(2)),
    (:sub, words(2)),
    (:sup, words(2)),
    (:code, words(2)),
    (:small, words(2)),
    (a 2).to_s
  ] + FFaker::Lorem.paragraphs(count - 1))
  fetch_sample(a, count: count).join(sep)
end