Class: Json::Merge::ThreeWayDecision

Inherits:
Object
  • Object
show all
Defined in:
lib/json/merge/three_way_decision.rb,
sig/json/merge.rbs

Overview

Computes base-aware JSON-family semantic decisions without rendering. rubocop:disable Metrics/ClassLength -- recursive decisions and classifications form one algorithm

Defined Under Namespace

Classes: Result, State

Instance Method Summary collapse

Instance Method Details

#call(base:, ours:, theirs:) ⇒ Result

Parameters:

  • base: (Object)
  • ours: (Object)
  • theirs: (Object)

Returns:



36
37
38
39
40
41
42
43
# File 'lib/json/merge/three_way_decision.rb', line 36

def call(base:, ours:, theirs:)
  merge_states(
    State.present(base),
    State.present(ours),
    State.present(theirs),
    path: ''
  )
end