module SubDiff::CoreExt::String
Public Instance Methods
gsub_diff(*args, &block)
click to toggle source
Behaves just like {String#gsub} but wraps the returned replacement string in an enumerable {Collection} of {Diff} objects.
See ruby-doc.org/core-2.2.0/String.html#method-i-gsub
# File lib/sub_diff/core_ext/string.rb 16 def gsub_diff(*args, &block) 17 Builder.new(self, :gsub).diff(*args, &block) 18 end
sub_diff(*args, &block)
click to toggle source
Behaves just like {String#sub} but wraps the returned replacement string in an enumerable {Collection} of {Diff} objects.
See ruby-doc.org/core-2.2.0/String.html#method-i-sub
# File lib/sub_diff/core_ext/string.rb 8 def sub_diff(*args, &block) 9 Builder.new(self, :sub).diff(*args, &block) 10 end