Module: LightService::Organizer::ScopedReducable

Included in:
Iterate, ReduceCase, ReduceIf, ReduceIfElse, ReduceUntil, WithCallback
Defined in:
lib/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/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