Sha256: 10d4826c79c9501860caa110f960df28c41c8bc3fb9f14ab44686fe004522fc7
Contents?: true
Size: 646 Bytes
Versions: 6
Compression:
Stored size: 646 Bytes
Contents
# frozen_string_literal: true module ConvenientService module Service module Plugins module HasResultSteps class Middleware < Core::MethodChainMiddleware def next(...) return chain.next(...) if entity.steps.none? last_step.result.copy end private def last_step ## # TODO: Use `entity.steps.find { |step| step.result.tap { |result| entity.step(result) }.not_success? }` for callbacks. # @last_step ||= entity.steps.find(&:not_success?) || entity.steps.last end end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems