Sha256: b0b96b78a65f53b6c8e91eea5c9949d1855d891def98028af3ef5c933e57422a
Contents?: true
Size: 583 Bytes
Versions: 13
Compression:
Stored size: 583 Bytes
Contents
# frozen_string_literal: true module Hyrax module Actors class EmbargoActor attr_reader :work # @param [Hydra::Works::Work] work def initialize(work) @work = work end # Update the visibility of the work to match the correct state of the embargo, then clear the embargo date, etc. # Saves the embargo and the work def destroy work.embargo_visibility! # If the embargo has lapsed, update the current visibility. work.deactivate_embargo! work.embargo.save! work.save! end end end end
Version data entries
13 entries across 13 versions & 1 rubygems