Class: ActiveFedoraIdBasedJob
- Inherits:
-
Object
- Object
- ActiveFedoraIdBasedJob
- Defined in:
- app/jobs/active_fedora_id_based_job.rb
Direct Known Subclasses
ActiveFedoraPidBasedJob, AuditJob, CharacterizeJob, CreateDerivativesJob, ImportUrlJob, ResolrizeGenericFileJob
Instance Attribute Summary collapse
-
#id ⇒ Object
(also: #generic_file_id)
Returns the value of attribute id.
Instance Method Summary collapse
-
#initialize(id) ⇒ ActiveFedoraIdBasedJob
constructor
A new instance of ActiveFedoraIdBasedJob.
- #object ⇒ Object (also: #generic_file)
- #queue_name ⇒ Object
- #run ⇒ Object
Constructor Details
#initialize(id) ⇒ ActiveFedoraIdBasedJob
Returns a new instance of ActiveFedoraIdBasedJob.
8 9 10 |
# File 'app/jobs/active_fedora_id_based_job.rb', line 8 def initialize(id) self.id = id end |
Instance Attribute Details
#id ⇒ Object Also known as: generic_file_id
Returns the value of attribute id.
6 7 8 |
# File 'app/jobs/active_fedora_id_based_job.rb', line 6 def id @id end |
Instance Method Details
#object ⇒ Object Also known as: generic_file
12 13 14 |
# File 'app/jobs/active_fedora_id_based_job.rb', line 12 def object @object ||= ActiveFedora::Base.find(id) end |
#queue_name ⇒ Object
2 3 4 |
# File 'app/jobs/active_fedora_id_based_job.rb', line 2 def queue_name :id_based end |
#run ⇒ Object
19 20 21 |
# File 'app/jobs/active_fedora_id_based_job.rb', line 19 def run raise "Define #run in a subclass" end |