Class: Redaction::Types::Text

Inherits:
Base
  • Object
show all
Defined in:
lib/redaction/types/text.rb

Instance Attribute Summary

Attributes inherited from Base

#data, #record

Instance Method Summary collapse

Methods inherited from Base

call, #initialize

Constructor Details

This class inherits a constructor from Redaction::Types::Base

Instance Method Details

#contentObject



6
7
8
9
10
11
12
# File 'lib/redaction/types/text.rb', line 6

def content
  paragraphs = 1.upto(rand(1..3)).map do
    Faker::Lorem.paragraph(sentence_count: rand(1..5))
  end

  "#{paragraphs.join("\n\n")}\n"
end