Module: Config::Validation::Schema
- Included in:
- Config
- Defined in:
- lib/config/validation/schema.rb
Instance Method Summary collapse
- #schema(&block) ⇒ Object
-
#schema=(value) ⇒ Object
Assigns schema configuration option.
Instance Method Details
#schema(&block) ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/config/validation/schema.rb', line 12 def schema(&block) if block_given? # Delay require until optional schema validation is requested Config::DryValidationRequirements.load_dry_validation! @schema = Dry::Schema.define(&block) else @schema end end |
#schema=(value) ⇒ Object
Assigns schema configuration option
8 9 10 |
# File 'lib/config/validation/schema.rb', line 8 def schema=(value) @schema = value end |