Class: Whenever::WebJob
- Inherits:
-
Object
- Object
- Whenever::WebJob
- Includes:
- ActionView::Helpers::DateHelper
- Defined in:
- app/models/whenever/web_job.rb
Instance Attribute Summary collapse
-
#interval ⇒ Object
readonly
Returns the value of attribute interval.
Instance Method Summary collapse
- #description ⇒ Object
-
#initialize(job, interval) ⇒ WebJob
constructor
A new instance of WebJob.
- #roles ⇒ Object
- #task ⇒ Object
Constructor Details
#initialize(job, interval) ⇒ WebJob
Returns a new instance of WebJob.
8 9 10 11 |
# File 'app/models/whenever/web_job.rb', line 8 def initialize job, interval @job = job @interval = interval end |
Instance Attribute Details
#interval ⇒ Object (readonly)
Returns the value of attribute interval.
6 7 8 |
# File 'app/models/whenever/web_job.rb', line 6 def interval @interval end |
Instance Method Details
#description ⇒ Object
19 20 21 |
# File 'app/models/whenever/web_job.rb', line 19 def description @job..fetch(:description) { task } end |
#roles ⇒ Object
29 30 31 |
# File 'app/models/whenever/web_job.rb', line 29 def roles @job.roles.join(', ') end |
#task ⇒ Object
15 16 17 |
# File 'app/models/whenever/web_job.rb', line 15 def task @job.[:task] end |