Class: SuperDiff::OperationTreeBuilders::Main

Inherits:
Object
  • Object
show all
Defined in:
lib/super_diff/operation_tree_builders/main.rb

Instance Method Summary collapse

Instance Method Details

#callObject



8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/super_diff/operation_tree_builders/main.rb', line 8

def call
  if resolved_class
    resolved_class.call(
      expected: expected,
      actual: actual,
    )
  elsif all_or_nothing?
    raise NoOperationTreeBuilderAvailableError.create(expected, actual)
  else
    nil
  end
end