module StringSplitter::Split::Refinements

expose the update! method as a refinement to StringSplitter but don't expose it to blocks

idea based on a suggestion here (as an alternative to a `friend` modifier): bugs.ruby-lang.org/issues/12962#note-5

Public Instance Methods

update!(count:, index:) click to toggle source
# File lib/string_splitter/split.rb, line 12
def update!(count:, index:)
  @count = count
  @index = index
  @position = index + 1
  freeze
end