Class: Cronos::TaskInterval
Constant Summary
Constants inherited from Interval
Interval::DAYS, Interval::MONTHS
Instance Attribute Summary collapse
-
#task ⇒ Object
Returns the value of attribute task.
Attributes inherited from Interval
#day, #dow, #hour, #min, #month
Instance Method Summary collapse
-
#initialize(task) ⇒ TaskInterval
constructor
A new instance of TaskInterval.
- #to_hash ⇒ Object
- #to_s ⇒ Object
Methods inherited from Interval
#at, #daily, #days, #every, #hourly, #midday, #midnight, #monthly, #of, #on, #weekdays, #weekends, #weekly
Constructor Details
#initialize(task) ⇒ TaskInterval
Returns a new instance of TaskInterval.
312 313 314 |
# File 'lib/cronos.rb', line 312 def initialize(task) @task = task end |
Instance Attribute Details
#task ⇒ Object
Returns the value of attribute task.
310 311 312 |
# File 'lib/cronos.rb', line 310 def task @task end |
Instance Method Details
#to_hash ⇒ Object
320 321 322 |
# File 'lib/cronos.rb', line 320 def to_hash super.merge(:command => task) end |
#to_s ⇒ Object
316 317 318 |
# File 'lib/cronos.rb', line 316 def to_s "#{super} #{@task}" end |