Class: Repeatable::Expression::Weekday
- Defined in:
- lib/repeatable/expression/weekday.rb
Instance Method Summary collapse
- #include?(date) ⇒ Boolean
-
#initialize(weekday:) ⇒ Weekday
constructor
A new instance of Weekday.
Methods inherited from Date
Methods inherited from Base
===, #difference, #intersection, #to_h, #union
Constructor Details
#initialize(weekday:) ⇒ Weekday
4 5 6 |
# File 'lib/repeatable/expression/weekday.rb', line 4 def initialize(weekday:) @weekday = weekday end |
Instance Method Details
#include?(date) ⇒ Boolean
8 9 10 |
# File 'lib/repeatable/expression/weekday.rb', line 8 def include?(date) date.wday == weekday end |