Sha256: d99a053e35db155c3cb718644edefa3be87ee84db6932f8d65e33d565ed01649

Contents?: true

Size: 765 Bytes

Versions: 1

Compression:

Stored size: 765 Bytes

Contents

# frozen_string_literal: true

module Prolog
  module Services
    # Replaces content within an HTML string based on endpoints and content.
    class ReplaceContent
      module Splitter
        # Simple class to move splitter parameter munging out of ReplaceContent.
        class SplitterParams
          def initialize(content, endpoints)
            @params = { content: content, endpoints: endpoints }
            self
          end

          def add(**extra_params)
            @params.merge! extra_params
            self
          end

          def to_hash
            @params
          end
        end # class Prolog::Services::ReplaceContent::Splitter::SplitterParams
      end
    end # class Prolog::Services::ReplaceContent::SplitterParams
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
prolog-services-replace_content-0.1.3 lib/prolog/services/replace_content/splitter/splitter_params.rb