Module: Dry::Mutations::DSL::Blocks

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

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#with_options(**params) {|_self| ... } ⇒ Object

with_options empty: true do |empty|

empty.string :bank_reference, nils: true
empty.array  :invoice_files,  nils: true

end

Yields:

  • (_self)

Yield Parameters:



20
21
22
23
24
# File 'lib/dry/mutations/dsl/blocks.rb', line 20

def with_options **params
  @environs = params
  yield self if block_given?
  @environs = nil
end