Class: Rivulet::Steps::Dispatch
- Inherits:
-
Rivulet::Step
- Object
- Rivulet::Step
- Rivulet::Steps::Dispatch
- Defined in:
- lib/rivulet/steps/dispatch.rb
Instance Method Summary collapse
Methods inherited from Rivulet::Step
container_class_path, inherited
Instance Method Details
#call(input) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/rivulet/steps/dispatch.rb', line 4 def call(input) input => { route:, params:, context: } result = route.callable.call(params: params, context: context) # We don't care if it's success or failure. # The result will be a response anyway. input[:response] = result.value_or(result.failure) Success(input) end |