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
9 10 11 12 13 14 15 16 17 |
# File 'lib/config/validation/schema.rb', line 9 def schema(&block) if block_given? # Delay require until optional schema validation is requested require 'dry-validation' @schema = Dry::Schema.define(&block) else @schema end end |
#schema=(value) ⇒ Object
Assigns schema configuration option
5 6 7 |
# File 'lib/config/validation/schema.rb', line 5 def schema=(value) @schema = value end |