372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
|
# File 'lib/wortsammler/class.Traceable.rb', line 372
def get_diff(other)
newval = self.get_comparison_string
oldval = other.get_comparison_string
similarity = "n/a"
if newval == oldval
result = nil
else
diff_as_html = "<pre>#{other.trace_orig}</pre><hr/><pre>#{self.trace_orig}</pre>"
rawDiff = Diffy::Diff.new(self.trace_orig, other.trace_orig)
diff_as_html = rawDiff.to_s(:html)
result = [self.id, similarity, diff_as_html]
diff_as_html = nil
end
result
end
|