Class: Dry::Transaction::StepAdapters::Around Private

Inherits:
Object
  • Object
show all
Defined in:
lib/dry/transaction/step_adapters/around.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.

Direct Known Subclasses

Raw

Instance Method Summary collapse

Instance Method Details

#call(operation, options, args, &block) ⇒ 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.



10
11
12
13
14
15
16
17
18
# File 'lib/dry/transaction/step_adapters/around.rb', line 10

def call(operation, options, args, &block)
  result = operation.(*args, &block)

  unless result.is_a?(Dry::Monads::Result)
    raise InvalidResultError, options[:step_name]
  end

  result
end