Class: Prolog::Services::ReplaceContent::Splitter::SplitterParams
- Inherits:
-
Object
- Object
- Prolog::Services::ReplaceContent::Splitter::SplitterParams
- Defined in:
- lib/prolog/services/replace_content/splitter/splitter_params.rb
Overview
Simple class to move splitter parameter munging out of ReplaceContent.
Direct Known Subclasses
Instance Method Summary collapse
- #add(**extra_params) ⇒ Object
-
#initialize(content, endpoints) ⇒ SplitterParams
constructor
A new instance of SplitterParams.
- #to_hash ⇒ Object
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_hash ⇒ Object
20 21 22 |
# File 'lib/prolog/services/replace_content/splitter/splitter_params.rb', line 20 def to_hash @params end |