Class: CarrierWave::Workers::Base

Inherits:
Struct
  • Object
show all
Defined in:
lib/backgrounder/workers/base.rb

Direct Known Subclasses

ProcessAsset, StoreAsset

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#columnObject

Returns the value of attribute column

Returns:

  • (Object)

    the current value of column



3
4
5
# File 'lib/backgrounder/workers/base.rb', line 3

def column
  @column
end

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



3
4
5
# File 'lib/backgrounder/workers/base.rb', line 3

def id
  @id
end

#klassObject

Returns the value of attribute klass

Returns:

  • (Object)

    the current value of klass



3
4
5
# File 'lib/backgrounder/workers/base.rb', line 3

def klass
  @klass
end

Class Method Details

.perform(*args) ⇒ Object



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

def self.perform(*args)
  new(*args).perform
end

Instance Method Details

#perform(*args) ⇒ Object



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

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