Class: SmartCore::Schema::Checker::Rules::Base Private
- Inherits:
-
Object
- Object
- SmartCore::Schema::Checker::Rules::Base
- Defined in:
- lib/smart_core/schema/checker/rules/base.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.
Instance Attribute Summary collapse
- #nested_reconciler ⇒ NilClass, SmartCore::Schema::Checker::Reconciler readonly private
- #options ⇒ SmartCore::Schema::Checker::Rules::Options readonly private
- #root_reconciler ⇒ SmartCore::Schema::Checker::Reconciler readonly private
- #schema_key ⇒ String readonly private
Instance Method Summary collapse
- #__verify!(verifiable_hash, matcher_options) ⇒ SmartCore::Schema::Checker::Rules::Verifier::Result private
- #filled(&nested_definitions) ⇒ self
- #initialize(root_reconciler, schema_key, &nested_definitions) ⇒ void constructor private
- #requirement ⇒ SmartCore::Schema::Checker::Rules::Requirement::Optional, SmartCore::Schema::Checker::Rules::Requirement::Required
- #type(required_type, &nested_definitions) ⇒ self
Constructor Details
#initialize(root_reconciler, schema_key, &nested_definitions) ⇒ 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.
39 40 41 42 43 44 45 |
# File 'lib/smart_core/schema/checker/rules/base.rb', line 39 def initialize(root_reconciler, schema_key, &nested_definitions) @root_reconciler = root_reconciler @schema_key = SmartCore::Schema::KeyControl.normalize(schema_key) @options = SmartCore::Schema::Checker::Rules::Options.new(self) @nested_reconciler = nil define_nested_reconciler(&nested_definitions) end |
Instance Attribute Details
#nested_reconciler ⇒ NilClass, SmartCore::Schema::Checker::Reconciler (readonly)
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.
23 24 25 |
# File 'lib/smart_core/schema/checker/rules/base.rb', line 23 def nested_reconciler @nested_reconciler end |
#options ⇒ SmartCore::Schema::Checker::Rules::Options (readonly)
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.
17 18 19 |
# File 'lib/smart_core/schema/checker/rules/base.rb', line 17 def @options end |
#root_reconciler ⇒ SmartCore::Schema::Checker::Reconciler (readonly)
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.
29 30 31 |
# File 'lib/smart_core/schema/checker/rules/base.rb', line 29 def root_reconciler @root_reconciler end |
#schema_key ⇒ String (readonly)
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.
11 12 13 |
# File 'lib/smart_core/schema/checker/rules/base.rb', line 11 def schema_key @schema_key end |
Instance Method Details
#__verify!(verifiable_hash, matcher_options) ⇒ SmartCore::Schema::Checker::Rules::Verifier::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.
58 59 60 61 62 |
# File 'lib/smart_core/schema/checker/rules/base.rb', line 58 def __verify!(verifiable_hash, ) SmartCore::Schema::Checker::Rules::Verifier.verify!( self, , verifiable_hash ) end |
#filled(&nested_definitions) ⇒ self
84 85 86 87 88 89 |
# File 'lib/smart_core/schema/checker/rules/base.rb', line 84 def filled(&nested_definitions) tap do .filled = SmartCore::Schema::Checker::Rules::Options::Filled.new(self) define_nested_reconciler(&nested_definitions) end end |
#requirement ⇒ SmartCore::Schema::Checker::Rules::Requirement::Optional, SmartCore::Schema::Checker::Rules::Requirement::Required
|
# File 'lib/smart_core/schema/checker/rules/base.rb', line 47
|
#type(required_type, &nested_definitions) ⇒ self
71 72 73 74 75 76 |
# File 'lib/smart_core/schema/checker/rules/base.rb', line 71 def type(required_type, &nested_definitions) tap do .type = SmartCore::Schema::Checker::Rules::Options::Type.new(self, required_type) define_nested_reconciler(&nested_definitions) end end |