Class: Conditions::After
- Inherits:
-
ScheduleCondition
- Object
- Condition
- FieldCondition
- ScheduleCondition
- Conditions::After
- Defined in:
- lib/triggerable/conditions/schedule/after.rb
Instance Method Summary collapse
Methods inherited from ScheduleCondition
#initialize, #scope, #true_for?
Methods inherited from FieldCondition
#initialize, #scope, #true_for?
Methods inherited from Condition
Constructor Details
This class inherits a constructor from Conditions::ScheduleCondition
Instance Method Details
#from ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'lib/triggerable/conditions/schedule/after.rb', line 3 def from case @math_condition when :greater_than, :less_than Time.now - @value when nil automation_time - @value - Engine.interval end end |
#to ⇒ Object
12 13 14 |
# File 'lib/triggerable/conditions/schedule/after.rb', line 12 def to automation_time - @value end |