Class: SmartCore::Schema::Checker::Reconciler Private
- Inherits:
-
Object
- Object
- SmartCore::Schema::Checker::Reconciler
- Defined in:
- lib/smart_core/schema/checker/reconciler.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Defined Under Namespace
Modules: Constructor, Matcher
Instance Method Summary collapse
- #__contract_rules ⇒ SmartCore::Schema::Checker::Rules private
- #__extra_keys_contract ⇒ SmartCore::Schema::Checker::Rules::ExtraKeys private
- #__match!(verifiable_hash) ⇒ void private
- #__strict? ⇒ Boolean private
- #initialize ⇒ void constructor private
- #non_strict! ⇒ void
- #optional(schema_key, &nested_definitions) ⇒ SmartCore::Schema::Checker::Rules::Optional
- #required(schema_key, &nested_definitions) ⇒ SmartCore::Schema::Checker::Rules::Required
- #strict!(is_strict = Constructor::DEFAULT_STRICT_BEHAVIOR) ⇒ void
Constructor Details
#initialize ⇒ void
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.
15 16 17 18 |
# File 'lib/smart_core/schema/checker/reconciler.rb', line 15 def initialize @rules = SmartCore::Schema::Checker::Rules.new @strict = Constructor::DEFAULT_STRICT_BEHAVIOR end |
Instance Method Details
#__contract_rules ⇒ SmartCore::Schema::Checker::Rules
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.
43 44 45 |
# File 'lib/smart_core/schema/checker/reconciler.rb', line 43 def __contract_rules rules end |
#__extra_keys_contract ⇒ SmartCore::Schema::Checker::Rules::ExtraKeys
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.
34 35 36 |
# File 'lib/smart_core/schema/checker/reconciler.rb', line 34 def __extra_keys_contract SmartCore::Schema::Checker::Rules::ExtraKeys end |
#__match!(verifiable_hash) ⇒ void
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.
This method returns an undefined value.
26 27 28 |
# File 'lib/smart_core/schema/checker/reconciler.rb', line 26 def __match!(verifiable_hash) SmartCore::Schema::Checker::Reconciler::Matcher.match(self, verifiable_hash) end |
#__strict? ⇒ Boolean
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.
52 53 54 |
# File 'lib/smart_core/schema/checker/reconciler.rb', line 52 def __strict? @strict end |
#non_strict! ⇒ void
This method returns an undefined value.
95 96 97 |
# File 'lib/smart_core/schema/checker/reconciler.rb', line 95 def non_strict! strict!(Constructor::STRICT_MODES[:non_strict]) end |
#optional(schema_key, &nested_definitions) ⇒ SmartCore::Schema::Checker::Rules::Optional
75 76 77 78 |
# File 'lib/smart_core/schema/checker/reconciler.rb', line 75 def optional(schema_key, &nested_definitions) rule = SmartCore::Schema::Checker::Rules::Optional.new(self, schema_key, &nested_definitions) rule.tap { rules[rule.schema_key] = rule } end |
#required(schema_key, &nested_definitions) ⇒ SmartCore::Schema::Checker::Rules::Required
63 64 65 66 |
# File 'lib/smart_core/schema/checker/reconciler.rb', line 63 def required(schema_key, &nested_definitions) rule = SmartCore::Schema::Checker::Rules::Required.new(self, schema_key, &nested_definitions) rule.tap { rules[rule.schema_key] = rule } end |
#strict!(is_strict = Constructor::DEFAULT_STRICT_BEHAVIOR) ⇒ void
This method returns an undefined value.
86 87 88 |
# File 'lib/smart_core/schema/checker/reconciler.rb', line 86 def strict!(is_strict = Constructor::DEFAULT_STRICT_BEHAVIOR) @strict = is_strict end |