class Dry::Schema::Step::Scoped

@api private

def call(result)

Other tags:
    Api: - private
def call(result)
  result.at(path) do |scoped_result|
    output = step.(scoped_result).to_h
    target = Array(path)[0..-2].reduce(result) { |a, e| a[e] }
    target.update(path.last => output)
  end
end

def initialize(path, step)

Other tags:
    Api: - private
def initialize(path, step)
  @path = Path[path]
  @step = step
end

def scoped(new_path)

Other tags:
    Api: - private
def scoped(new_path)
  self.class.new(Path[[*new_path, *path]], step)
end