Class: Hyrax::Transactions::Steps::DestroyWork Deprecated

Inherits:
Object
  • Object
show all
Includes:
Dry::Transaction::Operation
Defined in:
lib/hyrax/transactions/steps/destroy_work.rb

Overview

Deprecated.

A `dry-transcation` step that destroys a Work.

Since:

  • 3.0.0

Instance Method Summary collapse

Instance Method Details

#call(work) ⇒ Dry::Monads::Result

Parameters:

Returns:

  • (Dry::Monads::Result)

Since:

  • 3.0.0


17
18
19
20
21
# File 'lib/hyrax/transactions/steps/destroy_work.rb', line 17

def call(work)
  work.destroy! && Success(work)
rescue => err
  Failure(err)
end