Class: SuperDiff::Differs::CustomObject

Inherits:
Base
  • Object
show all
Defined in:
lib/super_diff/differs/custom_object.rb

Class Method Summary collapse

Methods inherited from Base

#call

Class Method Details

.applies_to?(expected, actual) ⇒ Boolean

Returns:

  • (Boolean)


4
5
6
7
8
# File 'lib/super_diff/differs/custom_object.rb', line 4

def self.applies_to?(expected, actual)
  expected.class == actual.class &&
    expected.respond_to?(:attributes_for_super_diff) &&
    actual.respond_to?(:attributes_for_super_diff)
end