class Triggerable::Conditions::ScheduleCondition
Public Class Methods
new(field, value)
click to toggle source
Calls superclass method
Triggerable::Conditions::FieldCondition::new
# File lib/triggerable/conditions/schedule/schedule_condition.rb, line 4 def initialize field, value @value = value.values.first if value.is_a?(Hash) super end
Public Instance Methods
scope(table)
click to toggle source
# File lib/triggerable/conditions/schedule/schedule_condition.rb, line 13 def scope table condition.scope(table) end
true_for?(object)
click to toggle source
# File lib/triggerable/conditions/schedule/schedule_condition.rb, line 9 def true_for? object condition.true_for?(object) end
Protected Instance Methods
automation_time()
click to toggle source
automation_time
is Time.now rounded by Engine.interval
# File lib/triggerable/conditions/schedule/schedule_condition.rb, line 20 def automation_time i = Triggerable::Engine.interval.to_i Time.at((Time.now.to_i / i) * i).utc end