Class: Quby::Compiler::Services::SeedDiff

Inherits:
Object
  • Object
show all
Defined in:
lib/quby/compiler/services/seed_diff.rb

Instance Method Summary collapse

Instance Method Details

#apply_patch(object, patch) ⇒ Object



11
12
13
14
# File 'lib/quby/compiler/services/seed_diff.rb', line 11

def apply_patch(object, patch)
  return object if patch.nil?
  apply_polymorphic(object, patch, path: "")
end

#format_patch(reference, candidate, path:) ⇒ Object



5
6
7
8
9
# File 'lib/quby/compiler/services/seed_diff.rb', line 5

def format_patch(reference, candidate, path:)
  @reference_for_debugging = reference
  @candidate_for_debugging = candidate
  format_polymorph_patch(reference, candidate, path: path)
end