Class: TypedOperation::ChainedOperation
- Inherits:
-
Object
- Object
- TypedOperation::ChainedOperation
- Includes:
- Operations::Composition
- Defined in:
- lib/typed_operation/chains/chained_operation.rb
Overview
Base class for operation chains.
Values flow through chains as-is - no implicit splatting. If you need to convert a value to kwargs for the next operation, use .then_passes { |v| NextOp.call(**v) } or .transform to reshape first.
Direct Known Subclasses
FallbackChain, MapChain, SequenceChain, SmartChain, SplatChain
Instance Method Summary collapse
-
#call ⇒ Object
: (*untyped, **untyped) -> _Result[untyped, untyped].
-
#initialize(left, right) ⇒ ChainedOperation
constructor
: (_Callable, _Callable) -> void.
Methods included from Operations::Composition
#or_else, #then, #then_passes, #then_spreads, #transform
Constructor Details
#initialize(left, right) ⇒ ChainedOperation
: (_Callable, _Callable) -> void
17 18 19 20 |
# File 'lib/typed_operation/chains/chained_operation.rb', line 17 def initialize(left, right) @left = left @right = right end |
Instance Method Details
#call ⇒ Object
: (*untyped, **untyped) -> _Result[untyped, untyped]
23 24 25 |
# File 'lib/typed_operation/chains/chained_operation.rb', line 23 def call(...) raise NotImplementedError, "Subclasses must implement #call" end |