Class: Decouplio::Steps::ServicePass
- Defined in:
- lib/decouplio/steps/service_pass.rb
Instance Attribute Summary
Attributes inherited from BaseStep
Instance Method Summary collapse
-
#initialize(name:, service:, args:, on_success_type:, on_failure_type:) ⇒ ServicePass
constructor
A new instance of ServicePass.
- #process(instance:) ⇒ Object
Constructor Details
#initialize(name:, service:, args:, on_success_type:, on_failure_type:) ⇒ ServicePass
Returns a new instance of ServicePass.
8 9 10 11 12 13 14 15 |
# File 'lib/decouplio/steps/service_pass.rb', line 8 def initialize(name:, service:, args:, on_success_type:, on_failure_type:) super() @name = name @service = service @args = args @on_success_type = on_success_type @on_failure_type = on_failure_type end |
Instance Method Details
#process(instance:) ⇒ Object
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/decouplio/steps/service_pass.rb', line 17 def process(instance:) instance.append_railway_flow(@name) @service.call( ctx: instance.ctx, ms: instance., **@args ) resolve(instance: instance) end |