Sha256: 6469770aa997968942e218726e341f46d953f69738eb7cf0a3905b0e7c388c27

Contents?: true

Size: 353 Bytes

Versions: 11

Compression:

Stored size: 353 Bytes

Contents

class ActiveFedoraPidBasedJob
  def queue_name
    :pid_based
  end

  attr_accessor :pid

  def initialize(pid)
    self.pid = pid
  end

  def object
    @object ||= ActiveFedora::Base.find(pid)
  end

  alias_method :generic_file, :object
  alias_method :generic_file_id, :pid

  def run
    raise RuntimeError, "Define #run in a subclass"
  end
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
sufia-6.0.0.rc4 sufia-models/app/jobs/active_fedora_pid_based_job.rb
sufia-models-6.0.0.rc4 app/jobs/active_fedora_pid_based_job.rb
sufia-6.0.0.rc3 sufia-models/app/jobs/active_fedora_pid_based_job.rb
sufia-models-6.0.0.rc3 app/jobs/active_fedora_pid_based_job.rb
sufia-6.0.0.rc2 sufia-models/app/jobs/active_fedora_pid_based_job.rb
sufia-models-6.0.0.rc2 app/jobs/active_fedora_pid_based_job.rb
sufia-6.0.0.rc1 sufia-models/app/jobs/active_fedora_pid_based_job.rb
sufia-models-6.0.0.rc1 app/jobs/active_fedora_pid_based_job.rb
sufia-6.0.0.beta1 sufia-models/app/jobs/active_fedora_pid_based_job.rb
sufia-models-6.0.0.beta1 app/jobs/active_fedora_pid_based_job.rb
sufia-models-5.0.0.beta1 app/jobs/active_fedora_pid_based_job.rb