Class: RRule::ByWeekNumber
- Inherits:
-
Object
- Object
- RRule::ByWeekNumber
- Defined in:
- lib/rrule/filters/by_week_number.rb
Instance Method Summary collapse
-
#initialize(by_week_numbers, context) ⇒ ByWeekNumber
constructor
A new instance of ByWeekNumber.
- #reject?(i) ⇒ Boolean
Constructor Details
#initialize(by_week_numbers, context) ⇒ ByWeekNumber
Returns a new instance of ByWeekNumber.
5 6 7 8 |
# File 'lib/rrule/filters/by_week_number.rb', line 5 def initialize(by_week_numbers, context) @by_week_numbers = by_week_numbers @context = context end |
Instance Method Details
#reject?(i) ⇒ Boolean
10 11 12 |
# File 'lib/rrule/filters/by_week_number.rb', line 10 def reject?(i) !by_week_numbers.include?(context.week_number_by_day_of_year[i]) && !by_week_numbers.include?(context.negative_week_number_by_day_of_year[i]) end |