Module: DependencyManager::ConfigSchemaMacros::ClassMethods
- Defined in:
- lib/dependency_manager/config_schema_macros.rb
Instance Method Summary collapse
-
#validate(**configuration) ⇒ Dry::Validation::Result
Runs validator.
-
#validate_with(&dry_schema) ⇒ Dry::Schema
Class-level macro for validations.
Instance Method Details
#validate(**configuration) ⇒ Dry::Validation::Result
Runs validator
69 70 71 |
# File 'lib/dependency_manager/config_schema_macros.rb', line 69 def validate(**configuration) @dry_schema.call(configuration) end |
#validate_with(&dry_schema) ⇒ Dry::Schema
Class-level macro for validations
59 60 61 |
# File 'lib/dependency_manager/config_schema_macros.rb', line 59 def validate_with(&dry_schema) @dry_schema = Dry::Schema.Params(&dry_schema) end |