Class: TurboTest::StaticAnalysis::ActiveRecord::DiffCompute
- Inherits:
-
Object
- Object
- TurboTest::StaticAnalysis::ActiveRecord::DiffCompute
- Defined in:
- lib/turbo_test_static_analysis/active_record_schema/diff_compute.rb
Instance Method Summary collapse
- #calc ⇒ Object
-
#initialize(new_snapshot, old_snapshot) ⇒ DiffCompute
constructor
A new instance of DiffCompute.
Constructor Details
#initialize(new_snapshot, old_snapshot) ⇒ DiffCompute
Returns a new instance of DiffCompute.
7 8 9 |
# File 'lib/turbo_test_static_analysis/active_record_schema/diff_compute.rb', line 7 def initialize(new_snapshot, old_snapshot) @data = { new: new_snapshot, old: old_snapshot } end |
Instance Method Details
#calc ⇒ Object
11 12 13 14 15 16 |
# File 'lib/turbo_test_static_analysis/active_record_schema/diff_compute.rb', line 11 def calc empty_diff.tap do |diff| compute(:extensions, diff[:extensions]) compute(:tables, diff[:tables]) end end |