class Prolog::Services::ReplaceContent::Splitter::Symmetric
A “symmetric” splitter inserts the same marker text before and after the selected range. This defaults to an empty string, but can be any simple string.
Constants
- DEFAULT_MARKER
Attributes
inner[R]
source[R]
Public Class Methods
new(content:, endpoints:, marker: DEFAULT_MARKER)
click to toggle source
# File lib/prolog/services/replace_content/splitter/symmetric.rb, line 51 def initialize(content:, endpoints:, marker: DEFAULT_MARKER) @inner = Internals.build_inner(content, endpoints, marker) @source = rebuild_source(content, endpoints) self end
Private Instance Methods
rebuild_source(content, endpoints)
click to toggle source
# File lib/prolog/services/replace_content/splitter/symmetric.rb, line 59 def rebuild_source(content, endpoints) Parts.parts(content, endpoints).join inner end