Class: TypedOperation::Pipeline::EmptyPipelineChain
- Inherits:
-
Object
- Object
- TypedOperation::Pipeline::EmptyPipelineChain
- Includes:
- Result::Mixin
- Defined in:
- lib/typed_operation/pipeline/empty_pipeline_chain.rb
Overview
Handles empty pipelines - just passes through input as Success.
Instance Method Summary collapse
-
#call(*args, **kwargs) ⇒ Object
: (*untyped, **untyped) -> untyped.
Instance Method Details
#call(*args, **kwargs) ⇒ Object
: (*untyped, **untyped) -> untyped
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/typed_operation/pipeline/empty_pipeline_chain.rb', line 11 def call(*args, **kwargs) value = if kwargs.any? kwargs elsif args.size == 1 args.first elsif args.any? args else {} end Success(value) end |