Module: Montrose::Rule

Included in:
Frequency, After, Before, DayOfMonth, DayOfWeek, DayOfYear, Except, HourOfDay, MonthOfYear, NthDayOfMonth, NthDayOfYear, TimeOfDay, Total, WeekOfYear
Defined in:
lib/montrose/rule.rb,
lib/montrose/rule/after.rb,
lib/montrose/rule/total.rb,
lib/montrose/rule/before.rb,
lib/montrose/rule/except.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/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, Before, DayOfMonth, DayOfWeek, DayOfYear, Except, HourOfDay, MonthOfYear, NthDayMatcher, NthDayOfMonth, NthDayOfYear, TimeOfDay, Total, WeekOfYear

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object


5
6
7
# File 'lib/montrose/rule.rb', line 5

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

Instance Method Details

#advance!(_time) ⇒ Object


13
14
15
# File 'lib/montrose/rule.rb', line 13

def advance!(_time)
  true
end

#continue?Boolean


17
18
19
# File 'lib/montrose/rule.rb', line 17

def continue?
  true
end

#include?(_time) ⇒ Boolean


9
10
11
# File 'lib/montrose/rule.rb', line 9

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