module Config::Validation::Schema

Public Instance Methods

schema(&block) click to toggle source
# 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) click to toggle source

Assigns schema configuration option

# File lib/config/validation/schema.rb, line 8
def schema=(value)
  @schema = value
end