Class: SubDiff::Sub Private

Inherits:
Object
  • Object
show all
Includes:
Buildable
Defined in:
lib/sub_diff/sub.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Processes matches for String#gsub replacements by pushing diffs into a Builder instance.

Used internally by Adapter.

Direct Known Subclasses

Gsub

Instance Attribute Summary

Attributes included from Buildable

#builder

Instance Method Summary collapse

Methods included from Buildable

included, #initialize

Instance Method Details

#diff(search, *args, &block) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


11
12
13
14
15
# File 'lib/sub_diff/sub.rb', line 11

def diff(search, *args, &block)
  differ.match(search, *args, block) do |diff|
    append_diff_to_builder(diff, search)
  end
end