Class: Hyrax::Embargo

Inherits:
Valkyrie::Resource
  • Object
show all
Defined in:
app/models/hyrax/embargo.rb

Overview

Note:

Embargo and Lease can, in principle, be collapsed into a single model with a `#visibility_during`, `#visibility_after`, `#end_date`, and `#history`. We haven't made this transition in order to simplify legacy support for `Hydra::AccessControls`.

The Valkyrie model for embargoes.

Instance Method Summary collapse

Instance Method Details

#active?Boolean

Returns:

  • (Boolean)

17
18
19
# File 'app/models/hyrax/embargo.rb', line 17

def active?
  (embargo_release_date.present? && Time.zone.today < embargo_release_date)
end