Module: SubDiff::CoreExt::String
- Defined in:
- lib/sub_diff/core_ext/string.rb
Instance Method Summary collapse
-
#gsub_diff(*args, &block) ⇒ Object
Behaves just like String#gsub but wraps the returned replacement string in an enumerable SubDiff::Collection of Diff objects.
-
#sub_diff(*args, &block) ⇒ Object
Behaves just like String#sub but wraps the returned replacement string in an enumerable SubDiff::Collection of Diff objects.
Instance Method Details
#gsub_diff(*args, &block) ⇒ Object
Behaves just like String#gsub but wraps the returned replacement string in an enumerable SubDiff::Collection of Diff objects.
16 17 18 |
# File 'lib/sub_diff/core_ext/string.rb', line 16 def gsub_diff(*args, &block) Builder.new(self, :gsub).diff(*args, &block) end |
#sub_diff(*args, &block) ⇒ Object
Behaves just like String#sub but wraps the returned replacement string in an enumerable SubDiff::Collection of Diff objects.
8 9 10 |
# File 'lib/sub_diff/core_ext/string.rb', line 8 def sub_diff(*args, &block) Builder.new(self, :sub).diff(*args, &block) end |