class ArticleFixtureGen::Data::Article
Details of generated Article
and internal details thereof.
Attributes
base_content[R]
config[R]
Public Class Methods
new(config:, base_content: nil)
click to toggle source
Reek kvetches about a :reek:ControlParameter. Too bad.
# 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
Public Instance Methods
to_s()
click to toggle source
# 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
Private Instance Methods
add_mtps(base_markup, decorator)
click to toggle source
# File lib/article_fixture_gen/data/article.rb, line 36 def add_mtps(base_markup, decorator) decorator.call(base_markup: base_markup, config: config).rstrip end