Class: VisibilityCopyWorker
- Inherits:
-
Object
- Object
- VisibilityCopyWorker
- Defined in:
- app/workers/visibility_copy_worker.rb
Instance Attribute Summary collapse
-
#pid ⇒ Object
Returns the value of attribute pid.
Instance Method Summary collapse
-
#initialize(pid) ⇒ VisibilityCopyWorker
constructor
A new instance of VisibilityCopyWorker.
- #queue_name ⇒ Object
- #run ⇒ Object
Constructor Details
#initialize(pid) ⇒ VisibilityCopyWorker
Returns a new instance of VisibilityCopyWorker.
8 9 10 |
# File 'app/workers/visibility_copy_worker.rb', line 8 def initialize(pid) self.pid = pid end |
Instance Attribute Details
#pid ⇒ Object
Returns the value of attribute pid.
6 7 8 |
# File 'app/workers/visibility_copy_worker.rb', line 6 def pid @pid end |
Instance Method Details
#queue_name ⇒ Object
2 3 4 |
# File 'app/workers/visibility_copy_worker.rb', line 2 def queue_name :permissions end |
#run ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'app/workers/visibility_copy_worker.rb', line 12 def run work = ActiveFedora::Base.load_instance_from_solr(pid) work.generic_files.each do |file| file. = work. file.visibility = work.visibility file.save! end end |