Sha256: 4c73481f07f1bffd2b5bd320318589e8c73d84f1487952d681be50c92bd4ce6e
Contents?: true
Size: 1.31 KB
Versions: 1
Compression:
Stored size: 1.31 KB
Contents
# frozen_string_literal: true module ConvenientService module Service module Plugins module HasResultSteps module Concern include Support::Concern instance_methods do def steps @steps ||= self.class .steps .tap(&:commit!) .map { |step| step.copy(overrides: {kwargs: {organizer: self}}) } end ## # TODO: Create for callbacks. # # def step(step_result) # step_result # end # end class_methods do def step(*args, **kwargs) step_class.new(*args, **kwargs.merge(container: self)) .tap { |step_instance| steps << step_instance } end ## # NOTE: Allows to pass a value to `in` method without processing it. # def raw(value) Entities::Method::Entities::Values::Raw.wrap(value) end def steps @steps ||= Entities::StepCollection.new end def step_class @step_class ||= Commands::CreateStepClass.call(service_class: self) end end end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
convenient_service-0.1.0 | lib/convenient_service/service/plugins/has_result_steps/concern.rb |