Sha256: 215521192a88fe0543f5271bd8aa088d538c9f337abf988e68ed6ff41ef78a4c

Contents?: true

Size: 1.13 KB

Versions: 2

Compression:

Stored size: 1.13 KB

Contents

# frozen_string_literal: true

require_relative './mtp_decorated_markup'
require_relative './smtp_decorator_params'

module ArticleFixtureGen
  module Data
    # 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 `:smtp_text` message with a string, and *must* respond
    #                to the `:smtp_count` message with a non-negative integer.
    #
    class SmtpDecoratedMarkup
      def self.call(base_markup:, config:, param_builder: SmtpDecoratorParams)
        params = param_builder.call(base_markup: base_markup, config: config)
        MtpDecoratedMarkup.call(params)
      end
    end # class ArticleFixtureGen::Data::SmtpDecoratedMarkup
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
article_fixture_gen-0.1.2 lib/article_fixture_gen/data/smtp_decorated_markup.rb
article_fixture_gen-0.1.1 lib/article_fixture_gen/data/smtp_decorated_markup.rb