Class: Decouplio::Steps::Pass

Inherits:
BaseStep
  • Object
show all
Defined in:
lib/decouplio/steps/pass.rb

Instance Attribute Summary

Attributes inherited from BaseStep

#name

Instance Method Summary collapse

Constructor Details

#initialize(name:, on_success_type:) ⇒ Pass

Returns a new instance of Pass.



8
9
10
11
12
# File 'lib/decouplio/steps/pass.rb', line 8

def initialize(name:, on_success_type:)
  super()
  @name = name
  @on_success_type = on_success_type
end

Instance Method Details

#process(instance:) ⇒ Object



14
15
16
17
18
19
# File 'lib/decouplio/steps/pass.rb', line 14

def process(instance:)
  instance.append_railway_flow(@name)
  instance.send(@name, **instance.ctx)

  resolve(instance: instance)
end