Class: Triggerable::Conditions::ScheduleCondition

Inherits:
FieldCondition show all
Defined in:
lib/triggerable/conditions/schedule/schedule_condition.rb

Direct Known Subclasses

After, Before

Instance Method Summary collapse

Methods inherited from FieldCondition

#desc

Methods inherited from Condition

build

Constructor Details

#initialize(field, value) ⇒ ScheduleCondition

Returns a new instance of ScheduleCondition.



4
5
6
7
# 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

Instance Method Details

#scope(table) ⇒ Object



13
14
15
# File 'lib/triggerable/conditions/schedule/schedule_condition.rb', line 13

def scope table
  condition.scope(table)
end

#true_for?(object) ⇒ Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/triggerable/conditions/schedule/schedule_condition.rb', line 9

def true_for? object
  condition.true_for?(object)
end