class FunctionalLightService::Organizer::ReduceUntil
Public Class Methods
run(organizer, condition_block, steps)
click to toggle source
# File lib/functional-light-service/organizer/reduce_until.rb, line 6 def self.run(organizer, condition_block, steps) ->(ctx) do return ctx if ctx.stop_processing? loop do ctx = scoped_reduce(organizer, ctx, steps) break if condition_block.call(ctx) || ctx.failure? end ctx end end