Class: Hyrax::Transactions::Steps::SetModifiedDate

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

Overview

A `dry-transaction` step that sets the modified date to now for an input work.

Since:

  • 2.4.0

Instance Method Summary collapse

Instance Method Details

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

Parameters:

Returns:

  • (Dry::Monads::Result)

Since:

  • 2.4.0


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

def call(work)
  work.date_modified = Hyrax::TimeService.time_in_utc

  Success(work)
end