Class: Repeatable::Expression::Weekday
- Inherits:
-
Date
- Object
- Base
- Date
- Repeatable::Expression::Weekday
show all
- Defined in:
- lib/repeatable/expression/weekday.rb
Instance Method Summary
collapse
Methods inherited from Date
#==, #hash
Methods inherited from Base
===, #deconstruct_keys, #difference, #intersection, #to_h, #union
Constructor Details
#initialize(weekday:) ⇒ void
7
8
9
|
# File 'lib/repeatable/expression/weekday.rb', line 7
def initialize(weekday:)
@weekday = weekday
end
|
Instance Method Details
#include?(date) ⇒ Boolean
12
13
14
|
# File 'lib/repeatable/expression/weekday.rb', line 12
def include?(date)
date.wday == weekday
end
|