Class: Definition::Types::Keys::Conformer
- Inherits:
-
Object
- Object
- Definition::Types::Keys::Conformer
- Defined in:
- lib/definition/types/keys.rb
Instance Method Summary collapse
- #conform ⇒ Object
-
#initialize(definition, value) ⇒ Conformer
constructor
A new instance of Conformer.
Constructor Details
#initialize(definition, value) ⇒ Conformer
Returns a new instance of Conformer.
39 40 41 42 43 |
# File 'lib/definition/types/keys.rb', line 39 def initialize(definition, value) self.definition = definition self.value = value self.errors = [] end |
Instance Method Details
#conform ⇒ Object
45 46 47 48 49 50 51 |
# File 'lib/definition/types/keys.rb', line 45 def conform add_extra_key_errors add_missing_key_errors values = conform_all_keys ConformResult.new(values, errors: errors) end |