Class: SuperDiff::ActiveRecord::OperationTreeBuilders::ActiveRecordModel

Inherits:
Basic::OperationTreeBuilders::CustomObject show all
Defined in:
lib/super_diff/active_record/operation_tree_builders/active_record_model.rb

Class Method Summary collapse

Methods inherited from Basic::OperationTreeBuilders::DefaultObject

#initialize

Methods inherited from Core::AbstractOperationTreeBuilder

#call

Constructor Details

This class inherits a constructor from SuperDiff::Basic::OperationTreeBuilders::DefaultObject

Class Method Details

.applies_to?(expected, actual) ⇒ Boolean

Returns:

  • (Boolean)


7
8
9
10
# File 'lib/super_diff/active_record/operation_tree_builders/active_record_model.rb', line 7

def self.applies_to?(expected, actual)
  expected.is_a?(::ActiveRecord::Base) &&
    actual.is_a?(::ActiveRecord::Base) && expected.instance_of?(actual.class)
end