Method: ArticleJSON::Export::PlainText::Exporter#text

Defined in:
lib/article_json/export/plain_text/exporter.rb

#textString

Generate a string with the plain text representation of all elements

Returns:

  • (String)


12
13
14
15
16
17
18
19
# File 'lib/article_json/export/plain_text/exporter.rb', line 12

def text
  @text ||=
    @elements.map do |element|
      ArticleJSON::Export::PlainText::Elements::Base
        .build(element)
        &.export
    end.join.strip
end