module Dry::Schema
def self.JSON(**options, &)
- Api: - public
Other tags:
- See: Schema#define -
Returns:
-
(Params)
-
def self.JSON(**options, &) define(**options, processor_type: JSON, &) end
def self.Params(**options, &)
- Api: - public
Other tags:
- See: Schema#define -
Returns:
-
(Params)
-
def self.Params(**options, &) define(**options, processor_type: Params, &) end
def self.config
- Api: - public
Returns:
-
(Config)
-
def self.config @config ||= Config.new end
def self.define(...)
- Api: - public
Other tags:
- See: DSL.new -
Returns:
-
(Processor)
-
Parameters:
-
options
(Hash
) --
def self.define(...) DSL.new(...).call end
def self.loader
- 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.do_not_eager_load("#{root}/dry/schema/messages/i18n.rb") loader.inflector.inflect("dsl" => "DSL") end end