Class: Conditions::ScheduleCondition
- Inherits:
-
FieldCondition
- Object
- Condition
- FieldCondition
- Conditions::ScheduleCondition
- Defined in:
- lib/triggerable/conditions/schedule/schedule_condition.rb
Instance Method Summary collapse
-
#initialize(field, value) ⇒ ScheduleCondition
constructor
A new instance of ScheduleCondition.
- #scope(table) ⇒ Object
- #true_for?(object) ⇒ Boolean
Methods inherited from Condition
Constructor Details
#initialize(field, value) ⇒ ScheduleCondition
Returns a new instance of ScheduleCondition.
3 4 5 6 7 8 9 |
# File 'lib/triggerable/conditions/schedule/schedule_condition.rb', line 3 def initialize field, value super if value.is_a?(Hash) @math_condition = value.keys.first @value = value.values.first end end |
Instance Method Details
#scope(table) ⇒ Object
15 16 17 |
# File 'lib/triggerable/conditions/schedule/schedule_condition.rb', line 15 def scope table condition.scope(table) end |
#true_for?(object) ⇒ Boolean
11 12 13 |
# File 'lib/triggerable/conditions/schedule/schedule_condition.rb', line 11 def true_for? object condition.true_for?(object) end |