module RubyDiff::Differ
Public Class Methods
diff(a,b)
click to toggle source
# File lib/rubydiff/kernel.rb, line 132 def self.diff(a,b) diffs = Diffs.new if a.class!=b.class diffs.add(Diff.new(:different_class, "#{a.class},#{b.class}")) else differ = differ_for(a.class) raise "No differ registered for #{a.class}" unless differ diffs.add_all(differ.diff(a,b)) end diffs end
differ_for(clazz)
click to toggle source
# File lib/rubydiff/kernel.rb, line 144 def self.differ_for(clazz) @@specific_differs[clazz] end