Class: Dry::Transaction::StepAdapters::Check Private
- Inherits:
-
Object
- Object
- Dry::Transaction::StepAdapters::Check
- Includes:
- Monads::Result::Mixin
- Defined in:
- lib/dry/transaction/step_adapters/check.rb
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.
Instance Method Summary collapse
Instance Method Details
#call(operation, _options, args) ⇒ 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.
8 9 10 11 12 |
# File 'lib/dry/transaction/step_adapters/check.rb', line 8 def call(operation, , args) input = args[0] res = operation.(*args) res == true || res.is_a?(Success) ? Success(input) : Failure(input) end |