Class: Quartz::CronJob
- Inherits:
-
Object
- Object
- Quartz::CronJob
- Defined in:
- lib/quartz/cron_job.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
- #execute(context) ⇒ Object
-
#initialize(name) ⇒ CronJob
constructor
A new instance of CronJob.
Constructor Details
#initialize(name) ⇒ CronJob
Returns a new instance of CronJob.
7 8 9 |
# File 'lib/quartz/cron_job.rb', line 7 def initialize(name) @name=name end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
6 7 8 |
# File 'lib/quartz/cron_job.rb', line 6 def name @name end |
Instance Method Details
#execute(context) ⇒ Object
10 11 12 13 |
# File 'lib/quartz/cron_job.rb', line 10 def execute(context) job_block = JobFactory.instance.jobs[@name] job_block.call end |