Module: Dry::Mutations

Defined in:
lib/dry/mutations.rb,
lib/dry/mutations/form.rb,
lib/dry/mutations/errors.rb,
lib/dry/mutations/schema.rb,
lib/dry/mutations/version.rb,
lib/dry/mutations/dsl/types.rb,
lib/dry/mutations/dsl/blocks.rb,
lib/dry/mutations/dsl/module.rb,
lib/dry/mutations/dsl/schema.rb,
lib/dry/mutations/dsl/weirdo.rb,
lib/dry/mutations/predicates.rb,
lib/dry/mutations/utils/procs.rb,
lib/dry/mutations/transactions.rb,
lib/dry/mutations/utils/generic.rb,
lib/dry/mutations/extensions/dummy.rb,
lib/dry/mutations/transactions/dsl.rb,
lib/dry/mutations/errors/error_atom.rb,
lib/dry/mutations/extensions/command.rb,
lib/dry/mutations/extensions/outcome.rb,
lib/dry/mutations/utils/dry-mutations.rb,
lib/dry/mutations/transactions/wrapper.rb,
lib/dry/mutations/errors/error_compiler.rb,
lib/dry/mutations/extensions/error_hash.rb,
lib/dry/mutations/extensions/error_array.rb,
lib/dry/mutations/transactions/container.rb,
lib/dry/mutations/transactions/step_adapters.rb,
lib/dry/mutations/transactions/step_adapters/chain.rb,
lib/dry/mutations/transactions/step_adapters/mutate.rb,
lib/dry/mutations/transactions/step_adapters/validate.rb,
lib/dry/mutations/transactions/step_adapters/tranquilo.rb,
lib/dry/mutations/transactions/step_adapters/transform.rb

Overview

:nodoc:

Defined Under Namespace

Modules: DSL, Errors, Extensions, Predicates, Transactions, Utils Classes: Form, Schema

Constant Summary collapse

VERSION =
'1.6.0'.freeze

Class Method Summary collapse

Class Method Details

.inject(target) ⇒ Object



30
31
32
33
34
# File 'lib/dry/mutations.rb', line 30

def self.inject target
  DSL::BRICKS.each do |mod|
    target.singleton_class.prepend ::Dry::Mutations::DSL.const_get(mod)
  end
end

.Schema(input_processor: nil, type: :schema, **options, &block) ⇒ Object



36
37
38
39
40
41
42
43
# File 'lib/dry/mutations.rb', line 36

def self.Schema(input_processor: nil, type: :schema, **options, &block)
  type = :schema unless type && ::Dry::Mutations.const_defined?(type.to_s.capitalize)
  parent = ::Dry::Mutations.const_get(type.to_s.capitalize)
  ::Dry::Validation.Schema(parent, **options) do
    configure { config.input_processor = input_processor } if input_processor
    instance_exec(&block) if block
  end
end

.Transaction(**params, &cb) ⇒ Object



10
11
12
# File 'lib/dry/mutations/transactions.rb', line 10

def self.Transaction(**params, &cb)
  # ::Dry::Transaction(container: )
end