Class: Jobs::BaseJob
- Inherits:
-
Object
- Object
- Jobs::BaseJob
- Defined in:
- lib/jobs/base_job.rb
Instance Method Summary collapse
- #execute(context) ⇒ Object
-
#initialize ⇒ BaseJob
constructor
A new instance of BaseJob.
- #perform_job ⇒ Object
Constructor Details
#initialize ⇒ BaseJob
Returns a new instance of BaseJob.
10 |
# File 'lib/jobs/base_job.rb', line 10 def initialize(); end |
Instance Method Details
#execute(context) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/jobs/base_job.rb', line 12 def execute(context) begin perform_job rescue Exception => e raise JobError.new(e) end end |
#perform_job ⇒ Object
20 21 22 |
# File 'lib/jobs/base_job.rb', line 20 def perform_job raise "Subclass must implement the perform job method" end |