Module: FunctionalLightService::Organizer::ScopedReducable

Included in:
Iterate, ReduceCase, ReduceIf, ReduceIfElse, ReduceUntil, WithCallback
Defined in:
lib/functional-light-service/organizer/scoped_reducable.rb

Instance Method Summary collapse

Instance Method Details

#scoped_reduce(organizer, ctx, steps) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/functional-light-service/organizer/scoped_reducable.rb', line 6

def scoped_reduce(organizer, ctx, steps)
  ctx.reset_skip_remaining! unless ctx.failure? || ctx.skip_all_remaining?
  ctx = organizer.with(ctx).reduce([steps])
  ctx.reset_skip_remaining! unless ctx.failure? || ctx.skip_all_remaining?

  ctx
end