Class: LightServiceExt::ApplicationOrganizer

Inherits:
Object
  • Object
show all
Extended by:
LightService::Organizer, WithErrorHandler
Defined in:
lib/light-service-ext/application_organizer.rb

Direct Known Subclasses

ApplicationOrchestrator

Class Method Summary collapse

Methods included from WithErrorHandler

with_error_handler

Class Method Details

.call(context) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/light-service-ext/application_organizer.rb', line 9

def call(context)
  ctx = ApplicationContext.make_with_defaults(context)

  with_error_handler(ctx: ctx) do
    with(ctx).around_each(RecordActions).reduce(all_steps)
  end
end

.reduce_if_success(steps) ⇒ Object



21
22
23
# File 'lib/light-service-ext/application_organizer.rb', line 21

def reduce_if_success(steps)
  reduce_if(->(ctx) { ctx.success? && ctx[:errors].blank? }, steps)
end

.stepsObject

Raises:

  • (NotImplementedError)


17
18
19
# File 'lib/light-service-ext/application_organizer.rb', line 17

def steps
  raise NotImplementedError
end