class LightService::Organizer::ReduceUntil
Public Class Methods
Source
# File lib/light-service/organizer/reduce_until.rb, line 6 def self.run(organizer, condition_block, steps) lambda do |ctx| 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