Class: ArticleFixtureGen::Data::PmtpDecoratedMarkup

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

Overview

Generate a copy of the specified base content with single marker-tag pairs inserted before random words in the content.

Parameters: ‘base_markup`: Must be a string representing a single HTML element with

child nodes, some containing text strings. The canonical
example is article-body markup presented as a containing
`div` with paragraphs and so on;

‘config`: A configuration-information object, which must respond to

the `:pmtp_text` message with a string, and *must* respond
to the `:pmtp_count` message with a non-negative integer.

Class Method Summary collapse

Class Method Details

.call(base_markup:, config:, param_builder: PmtpDecoratorParams) ⇒ Object



21
22
23
24
# File 'lib/article_fixture_gen/data/pmtp_decorated_markup.rb', line 21

def self.call(base_markup:, config:, param_builder: PmtpDecoratorParams)
  params = param_builder.call(base_markup: base_markup, config: config)
  MtpDecoratedMarkup.call(params)
end