Class: Prolog::Services::ReplaceContent::Splitter::SplitterParams

Inherits:
Object
  • Object
show all
Defined in:
lib/prolog/services/replace_content/splitter/splitter_params.rb

Overview

Simple class to move splitter parameter munging out of ReplaceContent.

Instance Method Summary collapse

Constructor Details

#initialize(content, endpoints) ⇒ SplitterParams

Returns a new instance of SplitterParams.



10
11
12
13
# File 'lib/prolog/services/replace_content/splitter/splitter_params.rb', line 10

def initialize(content, endpoints)
  @params = { content: content, endpoints: endpoints }
  self
end

Instance Method Details

#add(**extra_params) ⇒ Object



15
16
17
18
# File 'lib/prolog/services/replace_content/splitter/splitter_params.rb', line 15

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

#to_hashObject



20
21
22
# File 'lib/prolog/services/replace_content/splitter/splitter_params.rb', line 20

def to_hash
  @params
end