Class: CurationConcerns::Actors::EmbargoActor
- Inherits:
-
Object
- Object
- CurationConcerns::Actors::EmbargoActor
- Defined in:
- app/actors/curation_concerns/actors/embargo_actor.rb
Overview
Instance Attribute Summary collapse
- #work ⇒ Object readonly
Instance Method Summary collapse
-
#destroy ⇒ Object
Update the visibility of the work to match the correct state of the embargo, then clear the embargo date, etc.
-
#initialize(work) ⇒ EmbargoActor
constructor
A new instance of EmbargoActor.
Constructor Details
#initialize(work) ⇒ EmbargoActor
Returns a new instance of EmbargoActor.
7 8 9 |
# File 'app/actors/curation_concerns/actors/embargo_actor.rb', line 7 def initialize(work) @work = work end |
Instance Attribute Details
#work ⇒ Object (readonly)
4 5 6 |
# File 'app/actors/curation_concerns/actors/embargo_actor.rb', line 4 def work @work end |
Instance Method Details
#destroy ⇒ Object
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
13 14 15 16 17 18 |
# File 'app/actors/curation_concerns/actors/embargo_actor.rb', line 13 def destroy work. # If the embargo has lapsed, update the current visibility. work. work..save! work.save! end |