module Dry::Initializer::Dispatchers

def <<(dispatcher)

Returns:
  • (self) - itself

Parameters:
  • dispatcher (#call) --
def <<(dispatcher)
  @pipeline = [dispatcher] + pipeline
  self
end

def call(**options)

Returns:
  • (Hash) - normalized set of options

Parameters:
  • options (Hash) --
def call(**options)
  options = {null:, **options}
  pipeline.reduce(options) { |opts, dispatcher| dispatcher.call(**opts) }
end

def pipeline

def pipeline
  @pipeline ||= [
    PrepareSource, PrepareTarget, PrepareIvar, PrepareReader,
    PrepareDefault, PrepareOptional,
    UnwrapType, CheckType, BuildNestedType, WrapType
  ]
end