Class: CarrierWave::Workers::ProcessAsset
- Inherits:
-
Struct
- Object
- Struct
- CarrierWave::Workers::ProcessAsset
- Defined in:
- lib/backgrounder/workers/process_asset.rb
Instance Attribute Summary collapse
-
#column ⇒ Object
Returns the value of attribute column.
-
#id ⇒ Object
Returns the value of attribute id.
-
#klass ⇒ Object
Returns the value of attribute klass.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#column ⇒ Object
Returns the value of attribute column
5 6 7 |
# File 'lib/backgrounder/workers/process_asset.rb', line 5 def column @column end |
#id ⇒ Object
Returns the value of attribute id
5 6 7 |
# File 'lib/backgrounder/workers/process_asset.rb', line 5 def id @id end |
#klass ⇒ Object
Returns the value of attribute klass
5 6 7 |
# File 'lib/backgrounder/workers/process_asset.rb', line 5 def klass @klass end |
Class Method Details
.perform(*args) ⇒ Object
6 7 8 |
# File 'lib/backgrounder/workers/process_asset.rb', line 6 def self.perform(*args) new(*args).perform end |
Instance Method Details
#perform(*args) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/backgrounder/workers/process_asset.rb', line 10 def perform(*args) set_args(*args) if args.present? record = constantized_resource.find id if record record.send(:"process_#{column}_upload=", true) if record.send(:"#{column}").recreate_versions! && record.respond_to?(:"#{column}_processing") record.update_attribute :"#{column}_processing", nil end end end |