Module: Montrose::Rule

Included in:
Frequency, After, Between, Covering, DayOfMonth, DayOfWeek, DayOfYear, During, Except, HourOfDay, MinuteOfHour, MonthOfYear, NthDayOfMonth, NthDayOfYear, TimeOfDay, Total, Until, WeekOfYear
Defined in:
lib/montrose/rule.rb,
lib/montrose/rule/after.rb,
lib/montrose/rule/total.rb,
lib/montrose/rule/until.rb,
lib/montrose/rule/during.rb,
lib/montrose/rule/except.rb,
lib/montrose/rule/between.rb,
lib/montrose/rule/covering.rb,
lib/montrose/rule/day_of_week.rb,
lib/montrose/rule/day_of_year.rb,
lib/montrose/rule/hour_of_day.rb,
lib/montrose/rule/time_of_day.rb,
lib/montrose/rule/day_of_month.rb,
lib/montrose/rule/week_of_year.rb,
lib/montrose/rule/month_of_year.rb,
lib/montrose/rule/minute_of_hour.rb,
lib/montrose/rule/nth_day_matcher.rb,
lib/montrose/rule/nth_day_of_year.rb,
lib/montrose/rule/nth_day_of_month.rb

Overview

Defines the Rule duck type for recurrence rules

Defined Under Namespace

Modules: ClassMethods Classes: After, Between, Covering, DayOfMonth, DayOfWeek, DayOfYear, During, Except, HourOfDay, MinuteOfHour, MonthOfYear, NthDayMatcher, NthDayOfMonth, NthDayOfYear, TimeOfDay, Total, Until, WeekOfYear

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



24
25
26
# File 'lib/montrose/rule.rb', line 24

def self.included(base)
  base.extend ClassMethods
end

Instance Method Details

#advance!(_time) ⇒ Object



32
33
34
# File 'lib/montrose/rule.rb', line 32

def advance!(_time)
  true
end

#continue?(_time = nil) ⇒ Boolean

Returns:

  • (Boolean)


36
37
38
# File 'lib/montrose/rule.rb', line 36

def continue?(_time = nil)
  true
end

#include?(_time) ⇒ Boolean

Returns:

  • (Boolean)


28
29
30
# File 'lib/montrose/rule.rb', line 28

def include?(_time)
  fail "Class must implement #{__method__}"
end