Class: SuperDiff::ActiveRecord::OperationTreeBuilders::ActiveRecordRelation
- Inherits:
-
Basic::OperationTreeBuilders::Array
- Object
- Core::AbstractOperationTreeBuilder
- Basic::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 Basic::OperationTreeBuilders::Array
Methods inherited from Core::AbstractOperationTreeBuilder
Constructor Details
#initialize(actual:, **rest) ⇒ ActiveRecordRelation
Returns a new instance of ActiveRecordRelation.
11 12 13 14 15 |
# File 'lib/super_diff/active_record/operation_tree_builders/active_record_relation.rb', line 11 def initialize(actual:, **rest) super @actual = actual.to_a end |
Class Method Details
.applies_to?(expected, actual) ⇒ Boolean
7 8 9 |
# File 'lib/super_diff/active_record/operation_tree_builders/active_record_relation.rb', line 7 def self.applies_to?(expected, actual) expected.is_a?(::Array) && actual.is_a?(::ActiveRecord::Relation) end |