Class: TaskLoop::IntervalRule
- Defined in:
- lib/taskloop/rules/interval_rule.rb
Constant Summary
Constants inherited from Rule
Instance Attribute Summary collapse
-
#interval ⇒ Object
Returns the value of attribute interval.
Attributes inherited from Rule
Instance Method Summary collapse
- #desc ⇒ Object
-
#initialize(unit, interval) ⇒ IntervalRule
constructor
A new instance of IntervalRule.
- #is_conform_rule?(last_exec_time) ⇒ Boolean
Constructor Details
#initialize(unit, interval) ⇒ IntervalRule
Returns a new instance of IntervalRule.
6 7 8 9 |
# File 'lib/taskloop/rules/interval_rule.rb', line 6 def initialize(unit, interval) super unit @interval = interval end |
Instance Attribute Details
#interval ⇒ Object
Returns the value of attribute interval.
4 5 6 |
# File 'lib/taskloop/rules/interval_rule.rb', line 4 def interval @interval end |
Instance Method Details
#desc ⇒ Object
17 18 19 |
# File 'lib/taskloop/rules/interval_rule.rb', line 17 def desc super + "; interval: #{interval}" end |
#is_conform_rule?(last_exec_time) ⇒ Boolean
11 12 13 14 15 |
# File 'lib/taskloop/rules/interval_rule.rb', line 11 def is_conform_rule?(last_exec_time) # interval rule is different for other rules. It should be calculated by combining the interval times of all units. # So here returns false return false end |