Class: ArticleFixtureGen::Data::Article

Inherits:
Object
  • Object
show all
Defined in:
lib/article_fixture_gen/data/article.rb

Overview

Details of generated Article and internal details thereof.

Instance Method Summary collapse

Constructor Details

#initialize(config:, base_content: nil) ⇒ Article

Reek kvetches about a :reek:ControlParameter. Too bad.



17
18
19
20
21
22
23
24
# File 'lib/article_fixture_gen/data/article.rb', line 17

def initialize(config:, base_content: nil)
  @config = config
  logger = SemanticLogger['Article#initialize']
  @base_content = base_content || Default.base_content(config)
  logger.trace "Line #{__LINE__}", base_content: @base_content
  @str = nil
  self
end

Instance Method Details

#to_sObject



26
27
28
29
30
# File 'lib/article_fixture_gen/data/article.rb', line 26

def to_s
  return @str if @str
  str = add_mtps(base_content, PmtpDecoratedMarkup)
  @str = add_mtps(str, SmtpDecoratedMarkup)
end