Class: Mutant::Transform::Sequence Private
- Inherits:
-
Mutant::Transform
- Object
- Mutant::Transform
- Mutant::Transform::Sequence
- Defined in:
- lib/mutant/transform.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Sequence of transformations
Instance Method Summary collapse
-
#call(input) ⇒ Either<Error, Object>
private
Apply transformation to input.
Methods inherited from Mutant::Transform
Instance Method Details
#call(input) ⇒ Either<Error, Object>
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Apply transformation to input
387 388 389 390 391 392 393 394 395 396 397 |
# File 'lib/mutant/transform.rb', line 387 def call(input) current = input steps.each_with_index do |step, index| current = step.call(current).from_right do |error| return failure(error(cause: Index.wrap(error, index), input: input)) end end success(current) end |