module FunctionalLightService::Organizer::ClassMethods
In case this module is included
Public Instance Methods
execute(code_block)
click to toggle source
# File lib/functional-light-service/organizer.rb, line 51 def execute(code_block) Execute.run(code_block) end
iterate(collection_key, steps)
click to toggle source
# File lib/functional-light-service/organizer.rb, line 47 def iterate(collection_key, steps) Iterate.run(self, collection_key, steps) end
log_with(logger)
click to toggle source
# File lib/functional-light-service/organizer.rb, line 59 def log_with(logger) @logger = logger end
logger()
click to toggle source
# File lib/functional-light-service/organizer.rb, line 63 def logger @logger end
reduce(*actions)
click to toggle source
# File lib/functional-light-service/organizer.rb, line 35 def reduce(*actions) with({}).reduce(actions) end
reduce_if(condition_block, steps)
click to toggle source
# File lib/functional-light-service/organizer.rb, line 39 def reduce_if(condition_block, steps) ReduceIf.run(self, condition_block, steps) end
reduce_until(condition_block, steps)
click to toggle source
# File lib/functional-light-service/organizer.rb, line 43 def reduce_until(condition_block, steps) ReduceUntil.run(self, condition_block, steps) end
with(data = {})
click to toggle source
# File lib/functional-light-service/organizer.rb, line 18 def with(data = {}) VerifyCallMethodExists.run(self, caller(1..1).first) data[:_aliases] = @aliases if @aliases if @before_actions data[:_before_actions] = @before_actions.dup @before_actions = nil end if @after_actions data[:_after_actions] = @after_actions.dup @after_actions = nil end WithReducerFactory.make(self).with(data) end
with_callback(action, steps)
click to toggle source
# File lib/functional-light-service/organizer.rb, line 55 def with_callback(action, steps) WithCallback.run(self, action, steps) end