Class: Redaction::Types::BasicHtml
- Defined in:
- lib/redaction/types/basic_html.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Redaction::Types::Base
Instance Method Details
#content ⇒ Object
6 7 8 9 10 11 |
# File 'lib/redaction/types/basic_html.rb', line 6 def content [nil, "em", "strong"].shuffle.map! do |tag| text = Faker::Lorem.sentence(word_count: rand(1..3)).sub(/\.$/, "") tag ? "<#{tag}>#{text}</#{tag}>" : text end.join(" ") end |