Module: SmartCore::Schema::Checker::Reconciler::Matcher::ResultFinalizer Private

Defined in:
lib/smart_core/schema/checker/reconciler/matcher/result_finalizer.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Since:

  • 0.1.0

Version:

  • 0.3.0

Constant Summary collapse

ERRORS_CONTAINER_BUILDER =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Returns:

  • (Proc)

Since:

  • 0.1.0

-> { Hash.new { |hash, key| hash[key] = Set.new } }
EXTRA_KEYS_CONTAINER_BUILDER =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Returns:

  • (Proc)

Since:

  • 0.1.0

-> { Set.new }
SPREAD_KEYS_CONTAINER_BUILDER =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Returns:

  • (Proc)

Since:

  • 0.3.0

-> { Set.new }
EXTRA_KEY_ERROR_CODE =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Returns:

  • (Symbol)

Since:

  • 0.2.0

:extra_key

Class Method Summary collapse

Class Method Details

.finalize(result) ⇒ SmartCore::Schema::Result

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

rubocop:disable Layout/LineLength

Parameters:

Returns:

Since:

  • 0.1.0

Version:

  • 0.3.0



41
42
43
44
45
# File 'lib/smart_core/schema/checker/reconciler/matcher/result_finalizer.rb', line 41

def finalize(result)
  schema_errors, extra_keys, spread_keys = aggregate_errors(result)
  schema_errors, extra_keys, spread_keys = compile_errors(schema_errors, extra_keys, spread_keys)
  build_final_result(result, schema_errors, extra_keys, spread_keys)
end