Module: CarrierWave::Workers::Base

Included in:
ProcessAssetMixin, StoreAssetMixin
Defined in:
lib/backgrounder/workers/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#columnObject

Returns the value of attribute column.



6
7
8
# File 'lib/backgrounder/workers/base.rb', line 6

def column
  @column
end

#idObject

Returns the value of attribute id.



6
7
8
# File 'lib/backgrounder/workers/base.rb', line 6

def id
  @id
end

#klassObject

Returns the value of attribute klass.



6
7
8
# File 'lib/backgrounder/workers/base.rb', line 6

def klass
  @klass
end

#recordObject

Returns the value of attribute record.



6
7
8
# File 'lib/backgrounder/workers/base.rb', line 6

def record
  @record
end

Instance Method Details

#initialize(*args) ⇒ Object



8
9
10
11
# File 'lib/backgrounder/workers/base.rb', line 8

def initialize(*args)
  super(*args) unless self.class.superclass == Object
  set_args(*args) if args.present?
end

#perform(*args) ⇒ Object



13
14
15
16
17
# File 'lib/backgrounder/workers/base.rb', line 13

def perform(*args)
  set_args(*args) if args.present?
  self.record = constantized_resource.find id
rescue *not_found_errors
end