Sha256: 91b0c2dedfe2c0b5af8d38588c0c5fdd0ecd875c77444fbff5e430ec923139ae

Contents?: true

Size: 414 Bytes

Versions: 1

Compression:

Stored size: 414 Bytes

Contents

module Differ
  module StringDiffer
    def diff(old)
      Differ.diff(self, old, Differ.separator || "\n")
    end
    alias :- :diff
    
    def diff_by_char(old)
      Differ.diff(self, old, '')
    end

    def diff_by_word(old)
      Differ.diff(self, old, /\b/)
    end

    def diff_by_line(old)
      Differ.diff(self, old, "\n")
    end
  end
end

String.class_eval do
  include Differ::StringDiffer
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ninja-differ-1.0.0 lib/differ/string.rb