class Dry::Schema::Result

def replace(value)

Other tags:
    Api: - private
def replace(value)
  if value.is_a?(output.class)
    output.replace(value)
  elsif path.equal?(Path::EMPTY)
    @output = value
  else
    value_holder = path.keys.length > 1 ? @output.dig(*path.to_a[0..-2]) : @output
    value_holder[path.last] = value
  end
  self
end