Class: DelayedPaperclipJob

Inherits:
Struct
  • Object
show all
Defined in:
lib/delayed/jobs/delayed_paperclip_job.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#attachment_nameObject

Returns the value of attribute attachment_name

Returns:

  • (Object)

    the current value of attachment_name



1
2
3
# File 'lib/delayed/jobs/delayed_paperclip_job.rb', line 1

def attachment_name
  @attachment_name
end

#instance_idObject

Returns the value of attribute instance_id

Returns:

  • (Object)

    the current value of instance_id



1
2
3
# File 'lib/delayed/jobs/delayed_paperclip_job.rb', line 1

def instance_id
  @instance_id
end

#instance_klassObject

Returns the value of attribute instance_klass

Returns:

  • (Object)

    the current value of instance_klass



1
2
3
# File 'lib/delayed/jobs/delayed_paperclip_job.rb', line 1

def instance_klass
  @instance_klass
end

Instance Method Details

#performObject



2
3
4
5
6
# File 'lib/delayed/jobs/delayed_paperclip_job.rb', line 2

def perform
  instance = instance_klass.constantize.find(instance_id)

  instance.send(attachment_name).reprocess!    
end