Class: RRule::ByMonth

Inherits:
Object
  • Object
show all
Defined in:
lib/rrule/filters/by_month.rb

Instance Method Summary collapse

Constructor Details

#initialize(by_months, context) ⇒ ByMonth

Returns a new instance of ByMonth.



5
6
7
8
# File 'lib/rrule/filters/by_month.rb', line 5

def initialize(by_months, context)
  @by_months = by_months
  @context = context
end

Instance Method Details

#reject?(i) ⇒ Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/rrule/filters/by_month.rb', line 10

def reject?(i)
  !by_months.include?(context.month_by_day_of_year[i])
end