Class: Delta::SetOperator::ActiveRecord
- Inherits:
-
Delta::SetOperator
- Object
- Delta::SetOperator
- Delta::SetOperator::ActiveRecord
- Defined in:
- lib/delta/set_operator/active_record.rb
Constant Summary
Constants inherited from Delta::SetOperator
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(a:, b:, identifiers: nil, changes:) ⇒ ActiveRecord
constructor
A new instance of ActiveRecord.
Methods inherited from Delta::SetOperator
#a_minus_b, adapt, #b_minus_a, #intersection
Constructor Details
#initialize(a:, b:, identifiers: nil, changes:) ⇒ ActiveRecord
Returns a new instance of ActiveRecord.
8 9 10 11 12 |
# File 'lib/delta/set_operator/active_record.rb', line 8 def initialize(a:, b:, identifiers: nil, changes:) super self.identifiers = identifiers || [:id] end |
Class Method Details
.compatible?(a, b) ⇒ Boolean
4 5 6 |
# File 'lib/delta/set_operator/active_record.rb', line 4 def self.compatible?(a, b) a.is_a?(b.class) && a.class.name.include?("ActiveRecord") end |