class Dry::Schema::Step::Scoped
@api private
def call(result)
- 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)
- Api: - private
def initialize(path, step) @path = Path[path] @step = step end
def scoped(new_path)
- Api: - private
def scoped(new_path) self.class.new(Path[[*new_path, *path]], step) end