Module: FunctionalLightService::Organizer::ScopedReducable

Included in:
Iterate, ReduceIf, 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



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

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

  ctx
end