Module: Confset::Validation::Schema
- Included in:
- Confset
- Defined in:
- lib/confset/validation/schema.rb
Instance Method Summary collapse
- #schema(&block) ⇒ Object
-
#schema=(value) ⇒ Object
Assigns schema configuration option.
Instance Method Details
#schema(&block) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/confset/validation/schema.rb', line 11 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
7 8 9 |
# File 'lib/confset/validation/schema.rb', line 7 def schema=(value) @schema = value end |