Class: SuperDiff::ActiveRecord::OperationTreeBuilders::ActiveRecordRelation
- Inherits:
-
OperationTreeBuilders::Array
- Object
- OperationTreeBuilders::Base
- OperationTreeBuilders::Array
- SuperDiff::ActiveRecord::OperationTreeBuilders::ActiveRecordRelation
- Defined in:
- lib/super_diff/active_record/operation_tree_builders/active_record_relation.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(actual:, **rest) ⇒ ActiveRecordRelation
constructor
A new instance of ActiveRecordRelation.
Methods inherited from OperationTreeBuilders::Array
Methods inherited from OperationTreeBuilders::Base
Constructor Details
#initialize(actual:, **rest) ⇒ ActiveRecordRelation
Returns a new instance of ActiveRecordRelation.
9 10 11 12 13 |
# File 'lib/super_diff/active_record/operation_tree_builders/active_record_relation.rb', line 9 def initialize(actual:, **rest) super @actual = actual.to_a end |
Class Method Details
.applies_to?(expected, actual) ⇒ Boolean
5 6 7 |
# File 'lib/super_diff/active_record/operation_tree_builders/active_record_relation.rb', line 5 def self.applies_to?(expected, actual) expected.is_a?(::Array) && actual.is_a?(::ActiveRecord::Relation) end |