Class: Refile::Backgrounder::StoreWorker
- Inherits:
-
ActiveJob::Base
- Object
- ActiveJob::Base
- Refile::Backgrounder::StoreWorker
- Defined in:
- lib/refile/backgrounder/store_worker.rb
Instance Attribute Summary collapse
-
#attachment_name ⇒ Object
readonly
Returns the value of attribute attachment_name.
-
#record ⇒ Object
readonly
Returns the value of attribute record.
Instance Method Summary collapse
Instance Attribute Details
#attachment_name ⇒ Object (readonly)
Returns the value of attribute attachment_name.
4 5 6 |
# File 'lib/refile/backgrounder/store_worker.rb', line 4 def @attachment_name end |
#record ⇒ Object (readonly)
Returns the value of attribute record.
4 5 6 |
# File 'lib/refile/backgrounder/store_worker.rb', line 4 def record @record end |
Instance Method Details
#perform(record, attachment_name) ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/refile/backgrounder/store_worker.rb', line 7 def perform(record, ) @record = record @attachment_name = return unless file = upload attacher.get cleanup_cache! (file) if file yield if block_given? end |