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.



3
4
5
6
# File 'lib/rrule/filters/by_month.rb', line 3

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

Instance Method Details

#reject?(i) ⇒ Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/rrule/filters/by_month.rb', line 8

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