Module: Dry::Mutations::DSL::Schema

Defined in:
lib/dry/mutations/dsl/schema.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#schema(input_processor: nil, **options, &block) ⇒ Object



5
6
7
8
9
10
# File 'lib/dry/mutations/dsl/schema.rb', line 5

def schema input_processor: nil, **options, &block
  @schema ||= derived_schema input_processor: input_processor, **options, &block
  return @schema unless block_given?

  @schema = Validation.Schema(@schema, **@schema.options, &Proc.new)
end