module Dry::Schema

def self.JSON(**options, &block)

Other tags:
    Api: - public

Other tags:
    See: Schema#define -

Returns:
  • (Params) -
def self.JSON(**options, &block)
  define(**options, processor_type: JSON, &block)
end

def self.Params(**options, &block)

Other tags:
    Api: - public

Other tags:
    See: Schema#define -

Returns:
  • (Params) -
def self.Params(**options, &block)
  define(**options, processor_type: Params, &block)
end

def self.config

Other tags:
    Api: - public

Returns:
  • (Config) -
def self.config
  @config ||= Config.new
end

def self.define(**options, &block)

Other tags:
    Api: - public

Other tags:
    See: DSL.new -

Returns:
  • (Processor) -

Parameters:
  • options (Hash) --
def self.define(**options, &block)
  DSL.new(**options, &block).call
end

def self.loader

Other tags:
    Api: - private
def self.loader
  @loader ||= Zeitwerk::Loader.new.tap do |loader|
    root = File.expand_path("..", __dir__)
    loader.tag = "dry-schema"
    loader.inflector = Zeitwerk::GemInflector.new("#{root}/dry-schema.rb")
    loader.inflector.inflect(
      "dsl" => "DSL",
      "yaml" => "YAML",
      "json" => "JSON",
      "i18n" => "I18n"
    )
    loader.push_dir(root)
    loader.ignore(
      "#{root}/dry-schema.rb",
      "#{root}/dry/schema/{constants,errors,version,extensions}.rb",
      "#{root}/dry/schema/extensions"
    )
    loader.inflector.inflect("dsl" => "DSL")
  end
end