Class: HolidaysRules::Rules::DayOfWeek
- Defined in:
- lib/holidays_rules/rules.rb
Instance Method Summary collapse
- #holiday?(date) ⇒ Boolean
-
#initialize(wday) ⇒ DayOfWeek
constructor
A new instance of DayOfWeek.
Methods inherited from RuleBase
Constructor Details
#initialize(wday) ⇒ DayOfWeek
Returns a new instance of DayOfWeek.
18 19 20 |
# File 'lib/holidays_rules/rules.rb', line 18 def initialize(wday) @wday = wday end |
Instance Method Details
#holiday?(date) ⇒ Boolean
22 23 24 |
# File 'lib/holidays_rules/rules.rb', line 22 def holiday?(date) @wday == date.wday end |